Forum Moderators: phranque
why is that? what im doing wrong? please help
<VirtualHost *>
ServerName www.example.de
ServerAlias example.de
ScriptAlias /cgi-bin/ /home/gluswul/public_html/cgi-bin/
ServerAdmin admin@example.de
DocumentRoot /home/gluswul/public_html/
ErrorLog /home/gluswul/wwwlogs/error_log
LogLevel warn
LogFormat "%h %t \"%r\" \"%{User-agent}i\" %>s %b (%{Referer}i)" common
CustomLog /home/gluswul/wwwlogs/access_log common
</VirtualHost>
[edited by: jdMorgan at 2:02 pm (utc) on June 19, 2004]
[edit reason] Removed specifics per TOS [/edit]
the ****ing apache just seems to load the same documentroot for alle vhosts ... why is that? i tried it
with 2 config file for 2 virtual hosts. both should be loading diffrent documentroots, but they didnt. www.example.de points to /home/****/public_html/ and www.quux-foo.org points to another user, but both seems to point to the same (the first user)... quux-foo.org has two virtual hosts.. www.quux-foo.org and amy.quux-foo.org ... but they all seems to point to www.example.de (or his document root)... if i delete the vhost andreas... the both points to www.quux-foo.org ... i cant get more than one virtual host up the same time! but why?! it worked before, why not now?
[edited by: jdMorgan at 2:03 pm (utc) on June 19, 2004]
[edit reason] Removed speciifics per TOS [/edit]
# Use name-based virtual hosting.
#
NameVirtualHost 192.168.2.230:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *:80>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
<VirtualHost 192.168.2.230:80>
ServerAdmin admin@localhost
DocumentRoot "c:/www/example"
ServerName localhost
ErrorLog logs/localhost_error.log
CustomLog logs/localhost_access.log common
</VirtualHost>
<VirtualHost 192.168.2.230:80>
ServerAdmin Admin@example.com
DocumentRoot "C:/www/example"
ServerName example.com
ServerAlias *.example.com
ErrorLog logs/example-error.log
CustomLog logs/example-access.log common
<Directory "C:/www/example">
Options All Includes Indexes
</Directory>
</VirtualHost>
[edited by: jdMorgan at 2:53 pm (utc) on June 24, 2004]
[edit reason] Removed specifics per TOS [/edit]
Try adding a new NameVirtualHost directive with the 127.0.0.1 along the other one, take out the port definition (:80) -I don't really think you need it- and change the attribute of the VirtualHost to *, so they will look like this:
<VirtualHost *>
...
</VirtualHost>
By doing these changes you will be able to use name based virtual hosting on localhost (by changing the <i>hosts</i> file on your computer) and on the ip addresses you specify with the NameVirtualHost directive.
[tek-tips.com...]
- Zych
[edited by: jdMorgan at 2:55 pm (utc) on June 24, 2004]
[edit reason] Removed specifics per TOS [/edit]
NameVirtualHost *
<VirtualHost *>
ServerName domain1.com
DocumentRoot "C:/www/[b]domain1[/b]"
</VirtualHost>
<VirtualHost *>
ServerName domain2.com
DocumentRoot "C:/www/[b]domain2[/b]"
</VirtualHost>
<VirtualHost *>
ServerName localhost
DocumentRoot "c:/www/[b]localhost[/b]"
</VirtualHost>
NameVirtualHost 192.168.2.230
<VirtualHost 127.0.0.1>
ServerName localhost
DocumentRoot "c:/www/[b]localhost[/b]"
</VirtualHost>
<VirtualHost 192.168.2.230>
ServerName domain1.com
DocumentRoot "C:/www/[b]domain1[/b]"
</VirtualHost>
<VirtualHost 192.168.2.230>
ServerName domain2.com
DocumentRoot "C:/www/[b]domain2[/b]"
</VirtualHost>
Can I install an older version of Apache over this newer one to test that out? or do I need to completely remove this version then do a reinstall?
Hey philosophos: Did you ever get yours to work?
Thanks,
Zych
Take a look in the [httpd.apache.org...] page, it might give you a hint on what you are doing wrong.
- Zych