If you are ubuntu user, then you can install it from Synaptic.Once installed, then restart your pc machine.When you start the apache server, if you face any problems like this "apache2: Could not reliably determine the server's fully qualified domain name" then checkout this article.
Here i need the host the static files which is located under my home directory /home/jude/web/.
First copy the default site configuration
sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/web
Then edit the configuration file web and change the DocumentRoot to static files path /home/jude/web/.Finally change the directory directive, replace
Initially the sites-enabled directory will have the default conf as
root@Vaio:/etc/apache2/sites-enabled# ls -lr 000-default -> ../sites-available/defaultNow we must deactivate the old site configuration and activate the new web one.For activating please use the below commands
$/etc/apache2/ $sudo a2dissite default && sudo a2ensite webFinally, restart the apache server and browse the site via localhost
No comments :
Post a Comment