Forums / Install & configuration / VirtualHost, multiple installations and RewriteRule

VirtualHost, multiple installations and RewriteRule

Author Message

Linh Vu

Monday 08 November 2004 9:36:24 pm

Hi everyone,

I have a site on a virtual dedicated hosting plan (RH9, Apache 2.0.40, ezP 3.4.2). Due to many reasons, I had to setup 4 different ezPublish installations on my site: http://mysite/site1, http://mysite/site2... Two weeks ago, everything worked just fine. Today I was notified by an user that everything after the initial page isn't working, and I found out that every URL of the type /index.php/something is returning an Object Not Found 404 error. I figure this should have something to do with the RewriteRule. The problem is I don't know what has been changed, or if anything has been changed at all. I'm the only one who has access to the server, and I didn't change anything. It could be the provider reinstaling Apache but while I'm waiting for them to get back to me, I guess I should try to learn a bit more about ezPublish.

This is my current VirtualHost setting in httpd.conf (the commented out RewriteRule is the one I've been testing with.

NameVirtualHost mysite:80
<VirtualHost mysite:80>
<Directory /home/myacc/mysite/html>
Options Indexes Includes FollowSymLinks
AllowOverride All
</Directory>

#RewriteEngine On
#RewriteRule !(^/design|^/var/.*/storage|^/var/storage|^/var/.*/cache|^/var/cache|^/extension/.*/design|^/kernel/setup/packages|^/packages|^/share/icons).*\.(gif|css|jpg|png|jar|js|ico|pdf|swf)$ /index.php

ServerName mysite
DocumentRoot /home/myacc/mysite/html
SuexecUserGroup myacc myacc
ServerAdmin "myacc@mysite"
ScriptAlias "/cgi-bin/" "/home/myacc/mysite/cgi-bin/"
CustomLog "/home/myacc/mysite/access_log" "combined"
ErrorLog "/home/myacc/mysite/error_log"
</VirtualHost>

I have 4 ezPublish installations in: http://mysite/site1, http://mysite/site2, http://mysite/site3, http://mysite/site4, and a phpBB installation in http://mysite/forums. site1, site2, site3, site4 and forums are all folders under /home/myacc/mysite/html

Appreciate any pointer :)

Regards,
Linh

If I had more time, I would write less code.

Björn Dieding@xrow.de

Monday 15 November 2004 2:13:48 am

This is a known Problem....

you able ezurl_alias is fucked up. You need to fix that table by hand... this has nothing to do with apache or php

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Marco Zinn

Monday 15 November 2004 1:24:04 pm

Björn probably means "table"... And i think, he is right. Your problem sound like a problem with the "URL Alias" functionality (a function of ezPublish, not Apache).
Have a look at that "url_alias" Database table and see, if you find some "strange things". You should have approx. 1 table row per "node" (webpage), which does a translation from a "human-readable" URL to some internal IDs.

Björn said, that you must fix that manually, but i _think_, that there is a PHP script, that can fix the URL Alias table for this. See the Script updateniceurls.php in \update\common\scripts\ . When you are the server admin, you should be able to run that script from the "ezPublish root folder" (where the index.php is), and i think, this updates that table.
DO A BACKUP of your DB (and possibly the whole filesystem) before doing this!!!!!

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

Marco Zinn

Monday 15 November 2004 1:27:10 pm

Björn probably means "table"... And i think, he is right. Your problem sound like a problem with the "URL Alias" functionality (a function of ezPublish, not Apache).
Have a look at that "url_alias" Database table and see, if you find some "strange things". You should have approx. 1 table row per "node" (webpage), which does a translation from a "human-readable" URL to some internal IDs.

Björn said, that you must fix that manually, but i _think_, that there is a PHP script, that can fix the URL Alias table for this. See the Script updateniceurls.php in \update\common\scripts\ . When you are the server admin, you should be able to run that script from the "ezPublish root folder" (where the index.php is), and i think, this updates that table.
DO A BACKUP of your DB (and possibly the whole filesystem) before doing this!!!!!

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

eZ debug

Timing: Jan 18 2025 22:27:45
Script start
Timing: Jan 18 2025 22:27:45
Module start 'content'
Timing: Jan 18 2025 22:27:46
Module end 'content'
Timing: Jan 18 2025 22:27:46
Script end

Main resources:

Total runtime0.8053 sec
Peak memory usage4,096.0000 KB
Database Queries199

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 589.0938180.8047
Module start 'content' 0.00590.6775 769.8984610.4609
Module end 'content' 0.68330.1219 1,380.3594341.3438
Script end 0.8052  1,721.7031 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.5065210.0002
Check MTime0.00150.1902210.0001
Mysql Total
Database connection0.00070.082310.0007
Mysqli_queries0.729890.62471990.0037
Looping result0.00210.25701970.0000
Template Total0.777796.620.3889
Template load0.00180.227020.0009
Template processing0.775996.348320.3879
Template load and register function0.00010.011510.0001
states
state_id_array0.00100.128010.0010
state_identifier_array0.00070.090820.0004
Override
Cache load0.00150.1882280.0001
Sytem overhead
Fetch class attribute can translate value0.00110.135140.0003
Fetch class attribute name0.00130.157670.0002
XML
Image XML parsing0.00170.212040.0004
class_abstraction
Instantiating content class attribute0.00000.001880.0000
General
dbfile0.00400.5023390.0001
String conversion0.00000.003430.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
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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs