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

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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

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 Exponential 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 X

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

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 Exponential, 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 "Exponential 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 Exponential, 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 "Exponential 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