Apache Virtual Hosts
Ivan Gyurdiev
ivg2 at cornell.edu
Thu May 5 17:20:22 UTC 2005
On Thu, 2005-05-05 at 14:42 -0400, Ken Nordquist wrote:
> Ivan,
>
> For the NameVirtualHost, it is OK to have it as you have it... *:80
>
> However, for each virtual host, you MUST have an ip address in the
> <VirtualHost> directive...
I should clarify that I have used the Fedora HTTP config tool to setup
my configuration, so any problems in the config are probably bugs, since
I didn't create any of this myself.
Okay, here's some relevant config bits (none of which were configured
manually):
Also, please see if you can connect to http://justin.ivg2.net and get
something other than the default server page that you get when the index
is missing - all I see is the default page from my LAN. On the other
hand http://ivan.ivg2.net/hl2/ works just fine, because I use an
explicit IP.
NameVirtualHost 192.168.2.105:80
NameVirtualHost *:80
....
ServerAdmin ivg2 at cornell.edu
ServerName ivg2.net
...
# Virtual host Default Virtual Host
<VirtualHost *>
ServerAdmin ivg2 at cornell.edu
ServerSignature email
DirectoryIndex index.php index.html index.htm index.shtml
LogLevel debug
HostNameLookups off
</VirtualHost>
# Virtual host Ivan's Virtual Host
<VirtualHost 192.168.2.105:80>
DocumentRoot /var/www/html.ivan/
ErrorLog logs/error_log.ivan
ServerAdmin ivg2 at cornell.edu
ServerName ivan.ivg2.net
ServerAlias cobra.ivg2.net
TransferLog logs/access_log.ivan
DirectoryIndex index.html index.htm index.shtml
<Directory "/var/www/html.ivan/">
Options all
AllowOverride none
</Directory>
TransferLog logs/access_log.ivan
ErrorLog logs/error_log.ivan
</VirtualHost>
# Virtual host Justin's Virtual Host
<VirtualHost *:80>
DocumentRoot /var/www/html.justin/
ErrorLog logs/error_log.justin
ServerAdmin jjp33 at cornell.edu
ServerName justin.ivg2.net
TransferLog logs/access_log.justin
DirectoryIndex index.html index.htm index.shtml
<Directory "/var/www/html.justin/">
Options all
AllowOverride none
</Directory>
TransferLog logs/access_log.justin
ErrorLog logs/error_log.justin
</VirtualHost>
--
Ivan Gyurdiev <ivg2 at cornell.edu>
Cornell University
More information about the test
mailing list