virtual host setup - please!

Author Message

Johannes S.

Monday 17 April 2006 7:41:29 am

hi,

with the virtualhost setup below i see only text and no pictures or backgroundcolors in the "frontend" of ezpublish. the admin site is working.
the mediafiles (asf, swf, rm, mov) are working in the frontend, too.

i have checked out the manual and the net and apache sites but this setup which is a mix from the one from "ez systems" manual and from "http://ez.no/community/bugs/flash_quicktime_files_are_not_shown" is not working - and i have used already 10 hours to check out whats going on here.
i also checked out the comments in the manual but they are not working, too.

please could someone post a working virtualhost setup for apache2 and php4.4 on linux?
or even better, could someone tell what is missing or wrong?

---

<VirtualHost *>
DocumentRoot "/Applications/MAMP/htdocs"
ServerName localhost
</VirtualHost>

<VirtualHost *>

DocumentRoot "/Applications/MAMP/ez"

ServerName ez.local

<Directory /Applications/MAMP/ez>
Options All
AllowOverride All
</Directory>


DirectoryIndex index.php


RewriteEngine On
Rewriterule ^/var/storage/.* $0 [L]
Rewriterule ^/var/[^/]+/storage/.* $0 [L]
RewriteRule ^/var/cache/texttoimage/.* - [L]
RewriteRule ^/var/[^/]+/cache/texttoimage/.* - [L]
Rewriterule ^/design/[^/]+/(stylesheets|images|javascript)/.* $0 [L]
Rewriterule ^/share/icons/.* $0 [L]
RewriteRule ^/favicon.ico - [L]
RewriteRule ^/robots.txt - [L]
Rewriterule ^/extension/[^/]+/design/[^/]+/(stylesheets|images|javascript)/.* $0 [L]
Rewriterule .* /index.php


</VirtualHost>

---

best,
johannes

Johannes S.

Tuesday 18 April 2006 9:35:52 am

if i change the httpd.config virtualhost section like this:

---
RewriteEngine On
Rewriterule ^/var/storage/.* $0 [L]
Rewriterule ^/var/[^/]+/storage/.* $0 [L]
RewriteRule ^/var/cache/texttoimage/.* - [L]
RewriteRule ^/var/[^/]+/cache/texttoimage/.* - [L]
Rewriterule ^/design/[^/]+/(stylesheets|images|javascript)/.* $0 [L]
Rewriterule ^/share/icons/.* $0 [L]
RewriteRule ^/favicon.ico - [L]
RewriteRule ^/robots.txt - [L]
Rewriterule ^/extension/[^/]+/design/[^/]+/(stylesheets|images|javascript)/.* $0 [L]
Rewriterule \.(gif|css|jpg|png|txt|js|xsl|jar|ico|jpeg|xml|ezpkg|jar|swf|wma|mp3|mid|wav|wmv|mov)$ - [L]
Rewriterule .* /index.php
---

than backgroud colors are shown, but the pictures in the gallery, and the mov and swf formats are are not shown.

best,
johannes

Johannes S.

Tuesday 18 April 2006 10:54:17 am

yippijeiyeah!!!!!!

this is really working:

---
RewriteEngine On
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]
Rewriterule ^/extension/[^/]+/design/[^/]+/(stylesheets|images|javascripts?)/.* - [L]
RewriteRule ^/packages/styles/.* - [L]
RewriteRule ^/var/cache/debug.html.* - [L]
RewriteRule ^/var/[^/]+/cache/debug.html.* - [L]
RewriteRule !\.(gif|css|jpg|png|txt|js|xsl|jar|ico|jpeg|xml|ezpkg|jar|swf|wma|mp3|mid|wav|wmv|mov)$ /index.php
Rewriterule .* /index.php
---

this "RewriteRule ^/packages/styles/.+/thumbnail/.* - [L]" from the manual is not working for me.
i had to remove the part ".+/thumbnail/".

without "RewriteRule !\.(gif|css|jpg|jpeg|png|txt|html|js|xsl|jar|ico|xml|ezpkg|jar|swf|wma|mp3|mid|wav|wmv)$ /index.php" the media files are not show in "normal" pages like the first one.

there was a comment in the manual section where someone said that "Rewriterule .* /index.php" has to be "Rewriterule .* index.php" - this is not working for me - it gaves me the 400 error...

everything seems to work now. but if someone could explain why ".+/thumbnail/" is not working
and why this "Rewriterule .* index.php" is not working, too, it would be quite interesting...

cheers,
johannes

Kristof Coomans

Tuesday 18 April 2006 11:22:18 pm

You probably need both

RewriteRule ^/packages/styles/.+/thumbnail/.* - [L]

and

Rewriterule ^/packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]

like in the generic virtual host setup at http://ez.no/doc/ez_publish/technical_manual/3_6/installation/virtual_host_setup .

We use these rewrite rules (slightly modified version of the generic virtual host setup) for all our portals (Apache 2.0.x) and everything is working fine:

        RewriteEngine On
        RewriteRule ^/var/storage/.* - [L]
        RewriteRule ^/var/[^/]+/storage/.* - [L]
        RewriteRule ^/var/cache/texttoimage/.* - [L]
        RewriteRule ^/var/[^/]+/cache/texttoimage/.* - [L]
        Rewriterule ^/design/[^/]+/(stylesheets|images|javascripts?)/.* - [L]
        RewriteRule ^/share/icons/.* - [L]
        RewriteRule ^/extension/[^/]+/design/[^/]+/(stylesheets|images|javascripts?)/.* - [L]
        RewriteRule ^/packages/styles/.+/(stylesheets|images|javascripts?)/[^/]+/.* - [L]
        RewriteRule ^/packages/styles/.+/thumbnail/.* - [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

 

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Tony Coe

Thursday 17 August 2006 8:32:54 am

Please ignore this post - I have asked the question elsewhere on the forum, so deleted this entry! (I couldn't work out how to remove the post altogether though).

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 22:34:27
Script start
Timing: Jan 18 2025 22:34:27
Module start 'layout'
Timing: Jan 18 2025 22:34:27
Module start 'content'
Timing: Jan 18 2025 22:34:29
Module end 'content'
Timing: Jan 18 2025 22:34:29
Script end

Main resources:

Total runtime1.5584 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 588.0234152.6250
Module start 'layout' 0.00670.0041 740.648439.4453
Module start 'content' 0.01081.5461 780.0938633.8203
Module end 'content' 1.55680.0016 1,413.914116.1641
Script end 1.5584  1,430.0781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2094160.0002
Check MTime0.00130.0815160.0001
Mysql Total
Database connection0.00110.072410.0011
Mysqli_queries1.469294.2743650.0226
Looping result0.00070.0436630.0000
Template Total1.525297.920.7626
Template load0.00220.139120.0011
Template processing1.523097.723920.7615
Template load and register function0.00020.010410.0002
states
state_id_array0.00080.052310.0008
state_identifier_array0.00130.084520.0007
Override
Cache load0.00190.12391080.0000
Sytem overhead
Fetch class attribute can translate value0.00090.060730.0003
Fetch class attribute name0.00220.143570.0003
XML
Image XML parsing0.00310.197830.0010
class_abstraction
Instantiating content class attribute0.00000.001490.0000
General
dbfile0.00270.1755220.0001
String conversion0.00000.000640.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
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
21content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
13content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/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: 48
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs