How do I install and use Apache?
I have downloaded ubuntu Desktop. I want to create a web server to host Test Web Sites to show my potential clients. Any suggestions, tips, or good direction for me? My plan is to download Apache and just work through it. I would greatly appreciate anything that would help me get up and running.
-
First we need to install Apache 2. Either via a terminal or via the software center.
- Go to the software center. Search for Apache 2 and then install it.
- Type
sudo apt-get install apache2
in a terminal. - Reboot with
sudo reboot
Look in
/var/www/
place all of your html/css etc, files here.- Open a web-browser and go to
http://localhost/FileName
If you need more information about web server, ssh, or webdesign try these links:
- Ubuntu help regarding Apache 2.
- What's the best way of handling permissions for apache2's user www-data in /var/www?.
- If you need to access the web server via a network use ssh, how to set up a ubuntu server to be (securely) available from internet?.
The previous answer is actually slightly wrong, it's not:
sudo apt-get install apache-2
It should be:
sudo apt-get install apache2
If you're installing Apache, chances are that you would want PHP too, do that with:
sudo apt-get install php5 libapache2-mod-php5
You will need to restart Apache, so enter:
/etc/init.d/apache2 restart
Have fun! :-)