Forums / Install & configuration / virtual host setup - please!

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).

eZ debug

Timing: Jan 31 2025 07:30:28
Script start
Timing: Jan 31 2025 07:30:28
Module start 'content'
Timing: Jan 31 2025 07:30:28
Module end 'content'
Timing: Jan 31 2025 07:30:28
Script end

Main resources:

Total runtime0.2750 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0079 587.9531180.8281
Module start 'content' 0.00790.0079 768.7813102.0234
Module end 'content' 0.01580.2591 870.8047537.3047
Script end 0.2749  1,408.1094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00361.3212200.0002
Check MTime0.00150.5399200.0001
Mysql Total
Database connection0.00080.309010.0008
Mysqli_queries0.222280.77191410.0016
Looping result0.00130.46071390.0000
Template Total0.258794.010.2587
Template load0.00080.295310.0008
Template processing0.257893.745310.2578
Override
Cache load0.00050.195610.0005
Sytem overhead
Fetch class attribute can translate value0.00070.236410.0007
XML
Image XML parsing0.00030.110210.0003
General
dbfile0.01164.2320200.0006
String conversion0.00000.002330.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs