Forums / Install & configuration / rewriterule problems on Sun Cobalt RaQ 550

rewriterule problems on Sun Cobalt RaQ 550

Author Message

James Ward

Wednesday 14 May 2003 12:58:33 pm

My server (Sun Cobalt RaQ 550) sets a bunch of vitualhost information automatically and I am having no luck editing the file to get the correct rewriterule settings for ezpublish to eleminate index.php and eventually produce nice urls. Below is a sample of the vhosts conf file which is included into the httpd.conf:

<VirtualHost 123.123.123.123>
ServerName www.jamesward.ca
ServerAlias jamesward.ca
ServerAdmin admin
DocumentRoot /home/.sites/28/site1/web
ErrorDocument 401 /error/401-authorization.html
ErrorDocument 403 /error/403-forbidden.html
ErrorDocument 404 /error/404-file-not-found.html
ErrorDocument 500 /error/500-internal-server-error.html
RewriteEngine on
RewriteCond %{HTTP_HOST} !^216.138.213.110(:80)?$
RewriteCond %{HTTP_HOST} !^www.jamesward.ca(:80)?$ [NC]
RewriteRule ^/(.*) http://www.jamesward.ca/$1 [L,R]
RewriteOptions inherit
AliasMatch ^/~([^/]+)(/(.*))? /home/.sites/28/site1/users/$1/web/$3
# BEGIN WebScripting SECTION. DO NOT EDIT MARKS OR IN BETWEEN.
AddHandler cgi-wrapper .cgi
AddHandler cgi-wrapper .pl
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .php
# END WebScripting SECTION. DO NOT EDIT MARKS OR IN BETWEEN.
</VirtualHost>

I tried adding:
#eZ Publish Section
<Virtualhost 123.123.123.123>
<Directory /home/.sites/143/site1/web/>
Options FollowSymLinks Indexes ExecCGI
AllowOverride None
</Directory>

RewriteEngine On
RewriteRule !\.(gif|css|jpg|png|js)$ /home/.sites/143/site1/web/index.php

ServerAdmin root@localhost
DocumentRoot /home/.sites/143/site1/web/ezpublish/
ServerName 123.123.123.123
</VirtualHost>

This has had no effect. Is the an httpd.conf guru out there that can help me get this right? I also tried replacing all the information in the vhosts conf file with just the ezpublush vhosts info but this caused the wrong site to appear. Namely the main site on the server instead of the virtual site. Thanks in advance for any help.

working at www.wardnet.com
blogging at www.jamesward.ca

Paul Borgermans

Wednesday 14 May 2003 1:51:51 pm

Your rewite rule seems OK, the second virtual host will take precedence over the first one as it has the same IP address.

The rest is template editing:

http://ez.no/developer/ez_publish_3/documentation/ez_publish_3/howtos/how_do_i_generate_nice_urls

Your site does work with the index.php in the URL?

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Marco Zinn

Thursday 15 May 2003 11:17:49 am

How do you want to access your ez Site?
by the IP adress (123.123.123.123 in your example) or by a (sub-)domain?

_I_ think, that identically virtual hosts definitions will only evaluate the first block (first block has highest priority), but you can look that up in the apache docu.

If you can, I suggest to give your virtual host a name and replace the line
ServerName 123.123.123.123
with
ServerName ez.yourdomain.com

But you will have to redirect ez.yourdomain.com to the server's IP 123.123.123.124 via DNS (or hosts, for testing).

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

Paul Borgermans

Friday 16 May 2003 8:34:24 am

Sorry

Indeed the first block has precedence

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

James Ward

Tuesday 20 May 2003 7:37:33 pm

I was able to get it working by adding the line:
RewriteRule !\.(gif|css|jpg|png|js)$ /home/.sites/143/site1/web/index.php

Immediatly after "RewriteEngine on" in the default virtual host config file the server automagically created. My concern now is that I did not include:

<Directory <httproot>/ezpublish-xxx/>
Options FollowSymLinks Indexes ExecCGI
AllowOverride None
</Directory>

As described in the manual. Everything appears to be workin fine and I don't want to make any more changes until I am sure this section is necessary. If anyone could help me understand what this section does for ezpublish it would help me a lot.

Thanks.

working at www.wardnet.com
blogging at www.jamesward.ca

Jevon MacDonald

Tuesday 27 May 2003 11:04:29 am

Can I ask: How did you get the right version of PHP installed with all of the right build options?

- Jevon

James Ward

Tuesday 27 May 2003 11:10:40 am

Jevon,
I used http://www.solarspeed.net at a cost of $59.33 US.

Best 60 bucks I've ever spent. They log into your server and set it up for you. The only downside I'm aware of is that your command line php version is not updated. This is necessary to keep the RaQ admin interface functioning properly.

This could cause problems with eZ's cronjobs but I haven't experienced any problems yet. Check the RaQ forums for more details on the Solarspeed install.

working at www.wardnet.com
blogging at www.jamesward.ca

Jevon MacDonald

Tuesday 27 May 2003 11:21:53 am

Thanks, I have been using the PHP package at http://www.edison.ca/cobalt/ but they have limited build options (it is free afterall!) but charge a little much to do custom build options.

I will check out SolarSpeed, as soon as their site starts responding for me.