republican-creole
site Search:


 
    All Forums Hot Topics Gallery






how-to block ads


 
Search Topic:
Uniqs:
266
Share Topic
Posting?
Post a:
Post a:
Links: ·Forum FAQ ·Attitude Adjustment ·Linux docs ·DistroWatch ·OPLM ·FreeBSD Handbook
AuthorAll Replies


PToN

join:2001-10-04
Houston, TX

Apache2 virtual host with mod rewrite

Hello,

I am trying to deploy this web app i wrote and i am having some issues setting up the vhost with mod rewrite.

Here is my particular config for that vhost:
<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName analytics.domain.com
        ServerAlias analytics
 
        HostnameLookups On
        UseCanonicalName On
        ServerSignature On
 
        DocumentRoot /srv/www/vhosts/analytics.domain.com
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /srv/www/vhosts/analytics.domain.com/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                Allow from 192.168.0.0/24 192.168.10.0/24 192.168.20.0/24 192.168.30.0/24 192.168.50.0/24 192.168.100.0/24
 
                RewriteEngine On
                RewriteBase /analytics/
 
                # Disable rewrite for valid directory/files
                RewriteCond %{REQUEST_FILENAME} !-f
                RewriteCond %{REQUEST_FILENAME} !-d
 
                #map all request urls to a specific controller method
                RewriteRule ^(.*)$ index.php?/{controller}/{method}/$1 [L]
 
        </Directory>
 
        ErrorLog /var/log/apache2/analytics-error.log
 
        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel debug
 
        CustomLog /var/log/apache2/analytics-access.log combined
 
</VirtualHost>
 
 

At the moment i keep getting:
[Thu Jan 19 15:27:11 2012] [error] [client 192.168.20.103] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Thu Jan 19 15:27:11 2012] [debug] core.c(3063): [client 192.168.20.103] r->uri = /analytics/index.php
[Thu Jan 19 15:27:11 2012] [debug] core.c(3069): [client 192.168.20.103] redirected from r->uri = /analytics/index.php
[Thu Jan 19 15:27:11 2012] [debug] core.c(3069): [client 192.168.20.103] redirected from r->uri = /analytics/index.php
[Thu Jan 19 15:27:11 2012] [debug] core.c(3069): [client 192.168.20.103] redirected from r->uri = /analytics/index.php
[Thu Jan 19 15:27:11 2012] [debug] core.c(3069): [client 192.168.20.103] redirected from r->uri = /analytics/index.php
[Thu Jan 19 15:27:11 2012] [debug] core.c(3069): [client 192.168.20.103] redirected from r->uri = /analytics/index.php
[Thu Jan 19 15:27:11 2012] [debug] core.c(3069): [client 192.168.20.103] redirected from r->uri = /analytics/index.php
[Thu Jan 19 15:27:11 2012] [debug] core.c(3069): [client 192.168.20.103] redirected from r->uri = /analytics/index.php
[Thu Jan 19 15:27:11 2012] [debug] core.c(3069): [client 192.168.20.103] redirected from r->uri = /analytics/index.php
[Thu Jan 19 15:27:11 2012] [debug] core.c(3069): [client 192.168.20.103] redirected from r->uri = /analytics/index.php
 
 

Everything worked fine on development environment. Everything is the same except that on my dev env i am using WAMPSERVER which uses aliases instead of vhosts, but everything else is the same....

Using Debian Lenny, mod rewrite shows up under: /etc/apache2/mods-enabled

Any ideas??

Thanks


PToN

join:2001-10-04
Houston, TX

Oh silly me... Ended up being that on my dev environment the RewriteBase is "RewriteBase /analytics/" because it's using aliases, however, my production environment uses vhosts which makes the RewriteBase be "RewriteBase /".

Thanks for looking.


Sunday, 03-Jun 21:38:36 Terms of Use & Privacy | feedback | contact | Hosting by nac.net - DSL,Hosting & Co-lo
over 12.5 years online © 1999-2012 dslreports.com.
Most commented news this week
Hot Topics