Virtual Hosts do not work

This is a discussion on Virtual Hosts do not work within the Apache Web Server forums, part of the Web Server and Related Forums category; I have setup my apache2 like this (httpd2.conf, Mandrake 10.0) - and restarted before accessing the site. ### Main Configuration ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-04-2004
Matthias Pospiech
 
Posts: n/a
Default Virtual Hosts do not work

I have setup my apache2 like this (httpd2.conf, Mandrake 10.0) - and
restarted before accessing the site.

### Main Configuration Section
### You really shouldn't change these settings unless you're a guru
###
ServerRoot /etc/httpd/2.0
#ServerName localhost
#LockFile /etc/httpd/httpd.lock
PidFile /var/run/httpd.pid
ErrorLog logs/error_log
LogLevel debug
#DocumentRoot /home/matthias/www

NameVirtualHost *:80

<VirtualHost *:80>
ServerName localhost
DocumentRoot /home/matthias/www/localhost
</VirtualHost>

<VirtualHost *:80>
ServerName www.local-cqa.de
DocumentRoot /home/matthias/www/cqa
</VirtualHost>

However a both localhost and http://www.local-cqa.de/ result in:

The requested URL /home/matthias/www/index.php was not found on this server.


which is available..., but should not be accessed anyway.

Since right now nothing works, I need advice what to tryout next!
Matthias
  #2 (permalink)  
Old 11-04-2004
Davide Bianchi
 
Posts: n/a
Default Re: Virtual Hosts do not work

On 2004-11-04, Matthias Pospiech <matthiasPUNKTpospiech@gmx.de> wrote:
><VirtualHost *:80>
> ServerName localhost
> DocumentRoot /home/matthias/www/localhost
></VirtualHost>
>
><VirtualHost *:80>
> ServerName www.local-cqa.de
> DocumentRoot /home/matthias/www/cqa
></VirtualHost>


Usually you need also a <Directory ...> block with the permissions
required. Also, since both the "DocumentRoot" are pointing to
your Home dir, be sure that the directory and all the parents
directories are world-readable and world-executable.

As root do chmod 755 /home /home/matthias /home/matthias/www

> The requested URL /home/matthias/www/index.php was not found on
> this server.


Then it looks like your NameVirtualHost directive is not
processed at all, since he refer to /www/ directly. Check the config
file using apachectl configtest and check in the error_log if there
are complaints about the configuration.

Davide

--
Microsoft is a cross between The Borg and the Ferengi. Unfortunately they use
Borg to do their marketing and Ferengi to do their programming.
--Simon Slavin
  #3 (permalink)  
Old 11-04-2004
Matthias Pospiech
 
Posts: n/a
Default Re: Virtual Hosts do not work

Sorry, it was the .htaccess with mod_rewrite that caused the problem...

Matthias
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:35 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0