Virtualhost cannot access Admin site

Author Message

Chris Lan

Saturday 22 April 2006 5:10:37 am

Hi,

My site is installed on a virtual host but I can not modify the httpd.config on the apache server because I don't have a dedicated server and my provider cannot do it.

I have done the following changes to remove the index.php. My site works fine but I can not access to my admin site. I completly deleted the cache but nothing change.

<b>.htaccess</b>

RewriteEngine On
RewriteRule !\.(gif|jpe?g|png|css|js|html)|var(.+)storage.pdf(.+)\.pdf$ index.php

DirectoryIndex index.php

settings/override<b>site.ini.append.php</b>

[SiteAccessSettings]
ForceVirtualHost=true
CheckValidity=false
AvailableSiteAccessList[]=mysite
AvailableSiteAccessList[]=admin
MatchOrder=host
HostMatchMapItems[]=www.mydomain.com;mysite
HostMatchMapItems[]=www.admin.mydomain.com;admin

settings/admin<b>site.ini.append.php</b>

[SiteSettings]
SiteName=admin
SiteURL=www.admin.mydomain.com
LoginPage=custom

I have created the sub domain to access the admin interface but I obtained a 500 Internal error.

I tried many things but I still can not access my admin site.

Hope someone can help me. Thanks.
Chris

André R.

Saturday 22 April 2006 8:30:48 am

try

[SiteAccessSettings]
ForceVirtualHost=true
CheckValidity=false
AvailableSiteAccessList[]=mysite
AvailableSiteAccessList[]=admin
MatchOrder=host
HostMatchType=map
HostMatchMapItems[]=www.mydomain.com;mysite
HostMatchMapItems[]=www.admin.mydomain.com;admin

and

[SiteSettings]
DefaultAccess=mysite
SiteList[]=mysite

both in override.ini

And have you checked with your hosting provider that .htaccess is turned on ??

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Chris Lan

Saturday 22 April 2006 9:04:41 am

Hi André,

Thank you for your answer.

I found another way. I put

MatchOrder=host;uri

and I defined the directory in the site.ini.append.php as admin like this the system does ignore my previous cache that I can't clean up.

[FileSettings]
VarDir=var/admin

It might help someone because at the end it works without httpd.config modification.

Thanks again.
Chris

Chris Lan

Saturday 29 April 2006 2:06:22 am

Hi,

Ok I spoke too quickly. Because after a new cleaning of the cache, plain is back. I know few guys who could have told me that host;uri does not make sense. But I check everything (doc, forum...) and I certainly miss something:

What I would like to do: <b>remove index.php?/plain on virtual host environment but without access to apache configuration.</b>

Until now, I did:
1. Add the rewrite rule to .htaccess which works fine to remove index.php?
2. Then move from uri to host and as result plain removed.
3. The operation could have been perfect if I could have access to admin panel. In fact, I can't have access to the admin site anymore. I tried to use the hostmatch but it does not work because my apache server is not configure to the sub domain (I suppose).

I am stuck and frustrated. Somebody can save me?

Thanks. Chris

André R.

Sunday 30 April 2006 6:02:30 am

If you have settings like:

HostMatchMapItems[]=mydomain.com;mysite
HostMatchMapItems[]=www.mydomain.com;mysite
HostMatchMapItems[]=admin.mydomain.com;admin
HostMatchMapItems[]=www.admin.mydomain.com;admin

You will not be able to enter the admin site without proper dns setup,
menaing you'll have to set admin.mydomain.com to point to the ez folder.
If you are using windows 2000/xp, you can change your
windows/system32/drivers/etc/hosts file using notepad:

include the line:

127.0.0.1       admin.mydomain.com

Change the ip to the server you are using!
But you'll also have to get your provider to include admin.mydomain.com to point to your ez installation.

PS: The reason that you can access your mysite is probably this:

[SiteSettings]
DefaultAccess=mysite

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.