4.2 VHost settings

4.2 VHost settings

Sunday 04 October 2009 6:30:21 am - 7 replies

Author Message

Ɓukasz Serwatka

Monday 05 October 2009 2:17:06 am

Hi Marco,

We are fully aware of this issue. Our doc team will update relevant pages as soon as possible. I rise this topic internally as well.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Luigi Spagnolo

Tuesday 13 October 2009 8:28:41 am

I'm really interested too. I'm having some problems in setting ez 4.2 with vhost. It doesn't load the stylesheets and doesn't allow access to the admin interface.

Here is my content in httpd-vhosts.conf:

     <VirtualHost *:80>
	<Directory "path/to/ezpublish">
		Options FollowSymLinks
		AllowOverride None
	</Directory>

    <IfModule sapi_apache2.c>
        php_admin_flag safe_mode Off
        php_admin_value register_globals    0
        php_value magic_quotes_gpc  0
        php_value magic_quotes_runtime  0
        php_value allow_call_time_pass_reference 0
    </IfModule>

    DirectoryIndex index.php 

    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteRule content/treemenu/? /index_treemenu.php [L]
        Rewriterule ^/var/storage/.* - [L]
        Rewriterule ^/var/[^/]+/storage/.* - [L]
        RewriteRule ^/var/cache/texttoimage/.* - [L]
        RewriteRule ^/var/[^/]+/cache/texttoimage/.* - [L]
        Rewriterule ^/design/[^/]+/(stylesheets|images|javascript)/.* - [L]
        Rewriterule ^/share/icons/.* - [L]

        RewriteRule ^/favicon.ico - [L]
        RewriteRule ^/robots.txt - [L]
        # Uncomment the following lines when using popup style debug.
        # RewriteRule ^/var/cache/debug.html.* - [L]
        # RewriteRule ^/var/[^/]+/cache/debug.html.* - [L]
        RewriteRule .* /index.php
    </IfModule>

	DocumentRoot "path/to/ezpublish"
    ServerName hoc
	ServerAlias hoc admin.hoc
	
	ErrorLog "logs/hoc-error.log"
    CustomLog "logs/hoc-access.log" common
	
</VirtualHost>
 

And here is an excerpt of siye.ini.append.php:

[SiteAccessSettings]
CheckValidity=false
AvailableSiteAccessList[]=hoc_site
AvailableSiteAccessList[]=eng
AvailableSiteAccessList[]=ita
AvailableSiteAccessList[]=hoc_admin
AvailableSiteAccessList[]=iphone
MatchOrder=host 
HostMatchMapItems[]
HostMatchMapItems[]=hoc;eng
HostMatchMapItems[]=admin.hoc;hoc_admin 

Where I'm wrong?

update: I've also tried the suggestion in http://ez.no/developer/forum/install_configuration/ez_publish_4_2_cached_css_files_not_readable_by_the_browser but with no results.

Thank you in advance.
Luigi

Gaetano Giunta

Tuesday 13 October 2009 9:50:46 am

@luigi to help debugging rewrite / access problems, use firebug's "net" panel, or the livehttpheaders extension firefox . The do a GET request for the missing stuff by copy+pasting the incriminated url in the navigation bar, and analyze the response, with its full set of http headers.

Most of the time it is a good starting point.

If it is not, you can enable verbose logging of rewrite steps in Apache...

Principal Consultant International Business
Member of the Community Project Board

Marco Zinn

Tuesday 13 October 2009 2:35:05 pm

Guetano... while i agree 100% that these tools are useful...
Don't you think, that to every professional piece of software belongs a complete and up-to-date install documentation?
We are fully aware, that VHost type installation of ez is the best choice in terms of "nice URLs" and of security.... but we don't have the necessary set of Rewrite Rules/VHost configuration for this.
You are giving a user/customer hints for debugging a problem, that is caused by missing docu, because eZ Systems does not provide/update it...

Usually, all "current" useful documentation (read: install and upgrade docs) in found in the release news... but we cannot find them there, either.

So, ez, please provide the VHost configuration for ez 4.1 and 4.2. Thanks.

Marco
http://www.hyperroad-design.com

Gaetano Giunta

Wednesday 14 October 2009 1:19:25 am

@Marco I agree 100% with you, too. But producing high quality docs requires manpower (time). While we wait for them, the community can still provide help to the fellow users - in the form eg. of comments in the online manual

@Luigi you miss for sure:
- one rewrite rule for design elements inside extensions:
Rewriterule ^/extension/[^/]+/design/[^/]+/(stylesheets|images|javascript|flash|lib?)/.* - [L]
- one rewrite rule for the packed jss and css produced by the online editor
RewriteRule ^/var/[^/]+/cache/public/.* - [L]

Principal Consultant International Business
Member of the Community Project Board

Luigi Spagnolo

Wednesday 14 October 2009 10:14:19 am

@Gaetano: thank you very much . You are always very kind and helpful. Of course now css and js files are correctly loaded.

However, I still have a problem: when I try to access http://admin.hoc I obtain the same frontend "eng" siteaccess I get with the URL http://hoc and not the interface application...

Is this a problem in my site.ini settings, as I suppose?

[SiteAccessSettings]
CheckValidity=false
AvailableSiteAccessList[]=hoc_site
AvailableSiteAccessList[]=eng
AvailableSiteAccessList[]=ita
AvailableSiteAccessList[]=hoc_admin
AvailableSiteAccessList[]=iphone
MatchOrder=host 
HostMatchMapItems[]
HostMatchMapItems[]=admin.hoc;hoc_admin
HostMatchMapItems[]=hoc;eng

Luigi Spagnolo

Thursday 15 October 2009 7:40:25 am

Sorry, I've resolved everything and now the redirecting works properly.

However, I have yet another question:is there a way to set multiple websites with a single ezpublish installation so that the siteaccess to be loaded is determined in part on the basis of the domain and in part on the basis of what comes on the rest of the path (the first "folder")?

E.g. suppose I have:
www.mysite.com, with its siteaccesses mysite_eng and mysite_ita
www.myothersite.com, with its siteaccesses myothersite_eng and myothersite_ita

I would like to obtain the following:
www.mysite.com --> siteaccess mysite_eng
www.mysite.com/ita --> siteaccess mysite_ita
www.myothersite.com --> siteaccess myothersite_eng
www.myothersite.com/ita --> siteaccess myothersite_ita

How can I do, provided that the following doesn't work?

HostMatchMapItems[]
HostMatchMapItems[]=www.mysite.com;mysite_eng
HostMatchMapItems[]=www.mysite.com/ita;mysite_ita
HostMatchMapItems[]=www.myothersite.com;myothersite_eng
HostMatchMapItems[]=www.myothersite.com/ita;myothersite_ita

You must be logged in to post messages in this topic!

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