Forums / Install & configuration / Virtual hosting problem ... RewriteRule ! [urgent]

Virtual hosting problem ... RewriteRule ! [urgent]

Author Message

Selmah Maxim

Wednesday 08 February 2006 12:13:46 am

Hi ...


NameVirtualHost 206.131.125.164
 
<VirtualHost 206.131.125.164>
    <Directory /var/www/html/ez>
        Options FollowSymLinks
        AllowOverride None
    </Directory>
 
    <IfModule mod_php4.c>
        php_admin_flag safe_mode Off
        php_admin_value register_globals    0
        php_value magic_quotes_gpc  0
        php_value magic_quotes_runtime  0
        php_value allow_call_time_pass_reference 0
    </IfModule>
 

 
 
    DirectoryIndex index.php
 
    <IfModule mod_rewrite.c>
        RewriteEngine On
		
		RewriteCond %{HTTP_HOST} ^fm\..*        
		 RewriteRule ^(.*) /var/www/html/fm/FileManager/FileManager.cgi [L] 
		
		RewriteCond %{HTTP_HOST} ^pma\..*        
		 RewriteRule ^(.*) /var/www/html/pma [L] 
		
        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 ^/extension/[^/]+/design/[^/]+/(stylesheets|images|javascripts?)/.* - [L]
        Rewriterule ^/packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [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
    </IfModule>
 
    DocumentRoot /var/www/html/ez
    ServerName www.mysite.com
    ServerAlias admin.mysite.com
</VirtualHost>

Now .. i have some folders need to access .. such file manager, and phpmyadmin ... myback ... with any url ... I get ezp ... didn`t find any where .. how what to do . ..PLEASE ... !

Thanks in advanced !

Gabriel Ambuehl

Wednesday 08 February 2006 1:57:34 am

Take a clue from the ez setup and use

       Rewriterule ^/dontrewrite/path - [L]

Visit http://triligon.org

Selmah Maxim

Wednesday 08 February 2006 2:26:49 am

You mean .. if I have the file manager located in :

/var/www/html/fm

then

Rewriterule ^/var/www/html/fm - [L]

thats all ?!

Selmah Maxim

Wednesday 08 February 2006 2:28:56 am

Just tested it :

Rewriterule ^/var/www/html/fm - [L]

same :(

Selmah Maxim

Wednesday 08 February 2006 2:33:35 am

this works for me :

Rewriterule ^/fm/ - [L]

Selmah Maxim

Wednesday 08 February 2006 2:50:19 am

STRANGE ... befor worked .. and now ... same .. cann`t access fm folder ... ezpublish cames out !

Gabriel Ambuehl

Wednesday 08 February 2006 3:27:19 am

Did you restart Apache?

Visit http://triligon.org

Selmah Maxim

Wednesday 08 February 2006 3:35:01 am

yes .. just once worked ...

Selmah Maxim

Wednesday 08 February 2006 3:36:11 am

some times also giving me page not found !

Gabriel Ambuehl

Wednesday 08 February 2006 3:46:54 am

Try clearing your browsers cache then.

Visit http://triligon.org

Selmah Maxim

Wednesday 08 February 2006 3:51:50 am

Same ...

Also I had tested this :


              #THIS @@
               RewriteCond %{REQUEST_URI} !^/fm/ [OR]
               RewriteCond %{REQUEST_URI} !^/pma/ 




        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 ^/extension/[^/]+/design/[^/]+/(stylesheets|images|javascripts?)/.* - [L]
        Rewriterule ^/packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [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

Selmah Maxim

Wednesday 08 February 2006 4:30:12 am

I think I found the error ..

for error.log of apache :

File does not exist: /var/www/html/ez/fm/FileManager/FileManager.cgi

the path must be /var/www/html/fm/FileManager/FileManager.cgi

its seaching the ezp folder .. how to step to the prev dir ?!

Selmah Maxim

Wednesday 08 February 2006 11:34:40 am

Any one know what the wrong ... from the server or from the rewiterule ?!?

Sebastian Picklum

Thursday 09 February 2006 2:37:59 am

The RewriteRule is correct.

Since you configured /var/www/html/ez to be your DocumentRoot, the RewriteRule doesn't work. Simply move the fm directory to /var/www/html/ez/fm and everything should be fine.

sp@php.net

eZ debug

Timing: Jan 18 2025 11:14:28
Script start
Timing: Jan 18 2025 11:14:28
Module start 'content'
Timing: Jan 18 2025 11:14:29
Module end 'content'
Timing: Jan 18 2025 11:14:29
Script end

Main resources:

Total runtime0.6960 sec
Peak memory usage4,096.0000 KB
Database Queries229

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0091 587.9609180.8047
Module start 'content' 0.00910.5565 768.7656652.7031
Module end 'content' 0.56550.1303 1,421.4688350.0234
Script end 0.6958  1,771.4922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00460.6570210.0002
Check MTime0.00170.2476210.0001
Mysql Total
Database connection0.00160.229410.0016
Mysqli_queries0.613288.10292290.0027
Looping result0.00210.30072270.0000
Template Total0.668596.020.3342
Template load0.00220.317120.0011
Template processing0.666395.724420.3331
Template load and register function0.00020.025610.0002
states
state_id_array0.00080.113910.0008
state_identifier_array0.00070.095420.0003
Override
Cache load0.00190.2764480.0000
Sytem overhead
Fetch class attribute can translate value0.00110.156240.0003
Fetch class attribute name0.00120.1796140.0001
XML
Image XML parsing0.00070.099840.0002
class_abstraction
Instantiating content class attribute0.00000.0028140.0000
General
dbfile0.00370.5362210.0002
String conversion0.00000.001630.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
14content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
15content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 34
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs