How to set up a new web site

How to set up a new web site

Postby stephen » Fri Nov 05, 2010 5:51 am

The httpd.conf file is located in
/etc/apache2/httpd.conf
the httpd.conf file contains one line
servername cloud-1.mysite.org.au

the sites-available folder contains the list of sites on the server
eg
/etc/apache2/sites-available/mysite.org.au
the above file contains the virtualhost directive
eg
Code: Select all
<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www/mysite.org.au
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/mysite.org.au>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128 203.222.73.176/24
    </Directory>
    Alias /phpMyAdmin/ "/usr/share/phpmyadmin/"
    <Directory "/usr/share/phpmyadmin/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128 203.222.73.176/24
    </Directory>


</VirtualHost>


The sites-enabled folder holds links to the sites-available for each active site
/etc/apache2/sites-enabled/mysite.org.au
eg
Code: Select all
ls -l /etc/apache2/sites-enabled
total 0
lrwxrwxrwx 1 root root 41 2010-06-23 20:27 mysite.org.au -> ../sites-available/mysite.org.au
stephen
 
Posts: 507
Joined: Thu Feb 09, 2006 9:37 am
Location: Brisbane

Return to Cloud Central Debian Server

Who is online

Users browsing this forum: No registered users and 1 guest

cron