4.2 VHost settings

Author Message

Marco Zinn

Sunday 04 October 2009 6:30:21 am

Hi there,

where will we find the recommended (read: supported) VHost settings (Rewrite Rules, in particular) for the 4.1 and 4.2 releases inkluding all bundled extensions?

The doc page http://ez.no/doc/ez_publish/technical_manual/4_x/installation/virtual_host_setup is over 1 year old and there are some comments regarding the (bundled) OE and ezFlow extensions.
Can eZ please update that doc page?
In the .htaccess file, that comes with the release, the rewrites rules are very different now (and much simpler than the one in the doc page).

Also see question in http://ez.no/developer/forum/install_configuration/ez_publish_4_2_cached_css_files_not_readable_by_the_browser

Thanks.

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

Ɓ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

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

eZ debug

Timing: Jan 18 2025 16:03:30
Script start
Timing: Jan 18 2025 16:03:30
Module start 'layout'
Timing: Jan 18 2025 16:03:30
Module start 'content'
Timing: Jan 18 2025 16:03:31
Module end 'content'
Timing: Jan 18 2025 16:03:31
Script end

Main resources:

Total runtime1.1294 sec
Peak memory usage4,096.0000 KB
Database Queries76

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 587.9141152.6250
Module start 'layout' 0.00710.0042 740.539139.4453
Module start 'content' 0.01121.1165 779.9844712.7500
Module end 'content' 1.12780.0015 1,492.734424.1719
Script end 1.1293  1,516.9063 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2757160.0002
Check MTime0.00120.1097160.0001
Mysql Total
Database connection0.00090.082410.0009
Mysqli_queries1.047792.7670760.0138
Looping result0.00080.0725740.0000
Template Total1.091896.720.5459
Template load0.00220.193420.0011
Template processing1.089696.479220.5448
Template load and register function0.00010.008810.0001
states
state_id_array0.00080.070110.0008
state_identifier_array0.00180.159520.0009
Override
Cache load0.00190.1676670.0000
Sytem overhead
Fetch class attribute can translate value0.00110.095840.0003
Fetch class attribute name0.00120.1087120.0001
XML
Image XML parsing0.00200.173640.0005
class_abstraction
Instantiating content class attribute0.00000.0023160.0000
General
dbfile0.00150.1303360.0000
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
8content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
15content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 43
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs