Apache Web server Installation in Ubuntu
Ubuntu Linux is a great platform to use for an Apache Web server Installation. From a simple machine you can serve web pages to an Intranet or the Internet using one of the most popular Web server configurations.
LAMP Server
For new installations of Ubuntu, the easiest method to get the Apache Web server is by selecting the “LAMP” option on Ubuntu’s software selection screen during installation. This process will get the standard Linux, Apache, MySQL, PHP configuration setup on your server in one automated process.
If you don’t want to configure the server as a LAMP, or if you have other requirements, you can install Apache as a separate application once Ubuntu is installed.
If you went the Rackspace Cloud route, Rackspace has images of Ubuntu already provisioned so you get to skip the installation process and just jump to the Apache installation step.
Download and install Apache Web server
Open a putty session to your server and type “sudo apt-get install apache2” and then press return.
Ubuntu will download and install the Apache Web server software. When the process is complete, you can test your Web server by loading
Edit apache2.conf
If the default Apache page doesn’t load, you can try editing the apache2.conf file. Just type in “sudo nano /etc/apache2/apache2.conf” and then press enter to edit the file in Nano. Add the line, “ServerName localhost” to the file and then save and exit. Every time you change apache2.conf you should restart the Apache server so the changes will take effect. Type in sudo apache2ctl restart and press
Other considerations
Most of the time, people want to use PHP with Apache. To do this, all you have to do is type “sudo aptitude install php5 libapache2-mod-php5” into a terminal window and then press
After that, enable the PHP modules by typing in “sudo a2enmod php4” and then pressing
As you have seen, Apache Web server installation is really easy in Ubuntu. You can continue to add modules to Apache such as CGI and Perl if necessary. The Apache Web server is one of the most powerful available and is capable of running the most sophisticated Web applications.