Forums / Setup & design / virtualhost problems

virtualhost problems

Author Message

Ben Pirt

Wednesday 06 August 2003 3:29:51 am

hello all,
I have a site set up which is running on virtualhosts (www and admin for the two sections) and am transferring it from the dev box to the staging box. I am getting the error that the site is not in virtualhost mode, and this is causing all kinds of problems with the urls (the site just doesn't function. I have copied over the entire ezpublish directory as well as the SQL from the database which all installed fine. What could be causing the site to act as though it is not in virtualhost mode? The virtualhost container from httpd.conf looks pretty much like this:

<VirtualHost *>
<Directory /ge/www/ezpublish>
Options FollowSymLinks Indexes ExecCGI
php_flag magic_quotes_gpc Off
php_flag magic_quotes_runtime Off
php_value register_globals 0
AllowOverride None
RewriteEngine On
RewriteRule !\.(gif|css|jpg|png|pdf)$ /ge/www/ezpublish/index.php
</Directory>
DocumentRoot /ge/www/ezpublish
ServerName server.name.com
</virtualhost>

anyone have any ideas? spent quite a few hours on this now :-(

all the best,
Ben Pirt

Bjørn Kaarstein

Wednesday 06 August 2003 4:43:27 am

This is how my sites are set up as virtualhosts in httpd.conf:
They work fine.

Do you have any other functional domains running here aswell? There could be problems elsewhere in the httpd.conf file...

<Virtualhost * >
<Directory /EZsites/mysite>
Options FollowSymLinks Indexes ExecCGI
AllowOverride None
</Directory>

RewriteEngine On
RewriteRule !\.(gif|css|jpg|png|js)$ /EZsites/mysite/index.php

ServerAdmin root@localhost
DocumentRoot /EZsites/mysite
ServerName www.mysite.no
</VirtualHost>

<Virtualhost * >
<Directory /EZsites/mysite>
Options FollowSymLinks Indexes ExecCGI
AllowOverride None
</Directory>

RewriteEngine On
RewriteRule !\.(gif|css|jpg|png|js)$ /EZsites/mysite/index.php

ServerAdmin root@localhost
DocumentRoot /EZsites/mysite
ServerName admin.mysite.no
</VirtualHost>

Also, in site.ini.append.php I have

[SiteAccessSettings]
CheckValidity=false
MatchOrder=host
HostMatchMapItems[]=mysite.no;mysite
HostMatchMapItems[]=mysite.no;admin

Don't know if this helps you out, but it's working for me.

Regards Bjørn