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.

eZ debug

Timing: Jan 18 2025 16:01:06
Script start
Timing: Jan 18 2025 16:01:06
Module start 'content'
Timing: Jan 18 2025 16:01:06
Module end 'content'
Timing: Jan 18 2025 16:01:07
Script end

Main resources:

Total runtime0.9450 sec
Peak memory usage4,096.0000 KB
Database Queries213

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 587.9453180.8047
Module start 'content' 0.00740.7735 768.7500700.4063
Module end 'content' 0.78100.1640 1,469.1563344.4219
Script end 0.9450  1,813.5781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.4264210.0002
Check MTime0.00150.1557210.0001
Mysql Total
Database connection0.00170.184510.0017
Mysqli_queries0.822287.00252130.0039
Looping result0.00290.30272110.0000
Template Total0.913096.620.4565
Template load0.00210.217020.0010
Template processing0.910996.390420.4555
Template load and register function0.00010.008210.0001
states
state_id_array0.00140.144610.0014
state_identifier_array0.00100.110220.0005
Override
Cache load0.00210.2237860.0000
Sytem overhead
Fetch class attribute can translate value0.00150.153750.0003
Fetch class attribute name0.00160.1661110.0001
XML
Image XML parsing0.00190.196050.0004
class_abstraction
Instantiating content class attribute0.00010.0055140.0000
General
dbfile0.02072.1864400.0005
String conversion0.00000.000730.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
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
14content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
9content/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: 39
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs