<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
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
</Directory>
</VirtualHost>
<VirtualHost www.mysite.com>
DocumentRoot "/my/path/public_html/"
<Directory "/my/path/public_html/">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
*/etc/apache2/sites-available# /etc/init.d/apache2 reload
* Reloading web server config apache2
[Tue Jan 13 02:54:55 2009] [warn] VirtualHost www.legendsofold.com:0
overlaps with VirtualHost www.loohosting.com:0, the first has precedence,
perhaps you need a NameVirtualHost directive
[ OK ]
*:/etc/apache2/sites-available# ls
001-legends 002-loohosting default default-ssl
*:/etc/apache2/sites-available# cd ../sites-enabled
*:/etc/apache2/sites-enabled# ls
000-default 001-legends 002-loohosting
*:/etc/apache2/sites-enabled#
<VirtualHost www.legendsofold.com>
DocumentRoot "/my/path/public_html/"
<Directory "/my/path/public_html/">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
<VirtualHost www.loohosting.com>
DocumentRoot "/var/www/"
<Directory "/var/www/">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@localhost
UserDir www
ServerName www.my-website.com
DocumentRoot /path/to/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /path/to/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
</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
ServerSignature On
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
</Directory>
</VirtualHost>
NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@localhost
UserDir public_html
ServerName www.my-website.com
DocumentRoot /home/user/public_html/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/user/public_html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# # This directive allows us to have apache2's default start page
# # in /apache2-default/, but still have / go to the right place
</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
ServerSignature On
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
</Directory>
</VirtualHost>
*/etc/apache2/sites-available# a2ensite 001-loohosting
Enabling site 001-loohosting.
Run '/etc/init.d/apache2 reload' to activate new configuration!
*:/etc/apache2/sites-available# /etc/init.d/apache2 reload
* Reloading web server config apache2
[Tue Jan 13 03:40:23 2009] [error] VirtualHost *:80
– mixing * ports and non-* ports with a NameVirtualHost
address is not supported, proceeding with undefined results
[Tue Jan 13 03:40:23 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
[ OK ]
*:/etc/apache2/sites-available#
NameVirtualHost www.loohosting.com
<VirtualHost www.loohosting.com>
ServerAdmin webmaster@localhost
DocumentRoot /home/username1/public_html/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/username1/public_html/>
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
</Directory>
</VirtualHost>
<VirtualHost www.legendsofold.com>
ServerAdmin webmaster@localhost
DocumentRoot /home/username/public_html/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/username/public_html/>
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
</Directory>
</VirtualHost>
Does anyone have any advice to give me as to where I need to set up the new domain? I have searched on google and haven't quite found what I was looking for. Nothing seems to work with ubuntu or it is outdated and it doesn't work now.
Thoughts?