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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 01:30:52
Script start
Timing: Jan 31 2025 01:30:53
Module start 'layout'
Timing: Jan 31 2025 01:30:53
Module start 'content'
Timing: Jan 31 2025 01:30:53
Module end 'content'
Timing: Jan 31 2025 01:30:53
Script end

Main resources:

Total runtime0.0202 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0047 588.3828151.2422
Module start 'layout' 0.00470.0037 739.6250220.7500
Module start 'content' 0.00840.0102 960.37501,009.7891
Module end 'content' 0.01860.0015 1,970.164145.9922
Script end 0.0201  2,016.1563 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002412.0499140.0002
Check MTime0.00105.0371140.0001
Mysql Total
Database connection0.00073.418810.0007
Mysqli_queries0.002110.632730.0007
Looping result0.00000.113610.0000
Template Total0.00115.410.0011
Template load0.00094.218510.0009
Template processing0.00021.136810.0002
Override
Cache load0.00062.906610.0006
General
dbfile0.00031.280080.0000
String conversion0.00000.046140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs