Forums / Developer / Can't access admin side with ForceVirtualHost=true
Erik Weinmaster
Wednesday 06 April 2011 6:46:37 am
I am trying to setup eZ Publish 4.4 on a shared hosting plan with fastcgi. As per the recommendation from André R. I followed a lot of the advice from this posting: http://share.ez.no/forums/install-configuration/possible-to-remove-path-to-ez-index.php-under-fastcgi/%28language%29/eng-GB.
This works fine for my frontend. I use the url www.mysite.com and have successfully removed the index.php? element in the url.
However, now that I have switched ForceVirtualHost=true, I can't access the admin side. What I would like is to use a subdomain of www.admin.mysite.com. This is different from the link I mentioned earlier since that was setup to use www.mysite.com/cms (for the backend).
In short, what do I add to HostMatchMapItems under settings/override/site.ini.append.php? And do I forward the subdomain to www.mysite.com/cms or does ez publish take care of that?
Thanks
-erik
Nicolas Pastorino
Wednesday 06 April 2011 9:03:00 am
I just pinged a knowledgeable one on this, he might step-by !
-- Nicolas Pastorino Director Community - eZ Member of the Community Project Board eZ Publish Community on twitter: http://twitter.com/ezcommunity t : http://twitter.com/jeanvoye G+ : http://plus.tl/jeanvoye
André R.
Wednesday 06 April 2011 12:08:50 pm
As mentioned before in some other thread, fastcgi was not supported properly before 4.5.
So best resource for earlier versions are searching for cgi in the forums.
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
Friday 08 April 2011 7:16:09 am
I thought I would follow up since I found a decent solution to running 4.4 with php fastcgi. First you need to run it as uri (MatchOrder=uri). After that all one needs are these rewrite rules in .htaccess:
RewriteEngine On RewriteRule index_treemenu.php - [L] RewriteRule content/treemenu/? /index_treemenu.php [L] RewriteRule ^var/storage/.* - [L] RewriteRule ^var/[^/]+/storage/.* - [L] RewriteRule ^var/([^/]+/)?cache/(texttoimage|public)/.* - [L] RewriteRule ^design/[^/]+/(stylesheets|images|javascript)/.* - [L] RewriteRule ^share/icons/.* - [L] RewriteRule ^extension/[^/]+/design/[^/]+/(stylesheets?|images?|javascript|flash|lib?)/.* - [L] RewriteRule ^packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L] RewriteRule ^packages/styles/.+/thumbnail/.* - [L] RewriteRule ^favicon\.ico - [L] RewriteRule ^robots\.txt - [L]RewriteRule .* index.php
These rules will remove the index.php from the url. Since fastcgi will use index.php? in the url, once this is removed, everything seems to work.
Script start
Module start 'content'
Module end 'content'
Script end
Time used to render debug report: 0.0001 secs