Thursday, November 25, 2010


Installing Apache

#apt-get install apache2
#apt-get install apache2-doc

Now we'll do a quick check to verify Apache is running.

#/etc/init.d/apache2 start
Starting web server: Apache2httpd (pid 11205) already running

Now, try browsing with you IP Address/Localhost/LoopBackAdd
The default Apache files are stored in /var/www/
So, if you get an error, check this location for any files. If there are no files, move some html files and check again.

For Accessing Directories other than from /var/www, create a Virtual Directory.

Virtual Directories in Apache lets you browse websites with a http://localhost/sitename.
If the physical path for /sitename is located at a different location.


Solution:

Add the Following Lines to httpd.conf or conf.d/apache2.conf file(which are located in apache directory) and do the changes as per your requirement

Alias /sitename "/sites/sitename"
<Directory "/sites/sitename ">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order allow, deny
    Allow from all
</Directory>


No comments:

Post a Comment