Public bug reported:

Today, I installed a brand new server with 11.10 and duplicated a
working architecture on it (live on 2 other servers). This is not
working due to rewrite issues.

>From this .htaccess (mytwatch VHost):

(...)

<IfModule mod_rewrite.c>
        RewriteEngine On

        # Protect application and system files from being viewed
        RewriteRule ^(?:application|modules|system)\b - [F,L]
        # Allow any files or directories that exist to be displayed directly
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_URI} !/.*\.(png|jpg|gif|css|js)$
        # Rewrite all other URLs to index.php/URL
        RewriteRule .* index.php/$0 [PT]   # Original config. Also tried with 
[L] instead
</IfModule>

Calling : /welcome gets 404 on /index.php/welcome does not exists.
In this case index.php is a script containing routing functions dans there's no 
such file as  index.php/welcome in document root.

RewriteLog (level 3)  gives :
88.162.200.2 - philippe [10/Apr/2012:21:34:17 +0200] 
[miner2.mytnet.net/sid#7f144e5fdc60][rid#7f144e46c0a0/initial] (3) [perdir 
/data/www/mytwatch/htdocs/] strip per-dir prefix: 
/data/www/mytwatch/htdocs/welcome -> welcome
88.162.200.2 - philippe [10/Apr/2012:21:34:17 +0200] 
[miner2.mytnet.net/sid#7f144e5fdc60][rid#7f144e46c0a0/initial] (3) [perdir 
/data/www/mytwatch/htdocs/] applying pattern 
'^(?:application|modules|system)\b' to uri 'welcome'
88.162.200.2 - philippe [10/Apr/2012:21:34:17 +0200] 
[miner2.mytnet.net/sid#7f144e5fdc60][rid#7f144e46c0a0/initial] (3) [perdir 
/data/www/mytwatch/htdocs/] strip per-dir prefix: 
/data/www/mytwatch/htdocs/welcome -> welcome
88.162.200.2 - philippe [10/Apr/2012:21:34:17 +0200] 
[miner2.mytnet.net/sid#7f144e5fdc60][rid#7f144e46c0a0/initial] (3) [perdir 
/data/www/mytwatch/htdocs/] applying pattern '.*' to uri 'welcome'
88.162.200.2 - philippe [10/Apr/2012:21:34:17 +0200] 
[miner2.mytnet.net/sid#7f144e5fdc60][rid#7f144e46c0a0/initial] (2) [perdir 
/data/www/mytwatch/htdocs/] rewrite 'welcome' -> 'index.php/welcome'
88.162.200.2 - philippe [10/Apr/2012:21:34:17 +0200] 
[miner2.mytnet.net/sid#7f144e5fdc60][rid#7f144e46c0a0/initial] (3) [perdir 
/data/www/mytwatch/htdocs/] add per-dir prefix: index.php/welcome -> 
/data/www/mytwatch/htdocs/index.php/welcome
88.162.200.2 - philippe [10/Apr/2012:21:34:17 +0200] 
[miner2.mytnet.net/sid#7f144e5fdc60][rid#7f144e46c0a0/initial] (2) [perdir 
/data/www/mytwatch/htdocs/] forcing 
'/data/www/mytwatch/htdocs/index.php/welcome' to get passed through to next API 
URI-to-filename handler
88.162.200.2 - philippe [10/Apr/2012:21:34:17 +0200] 
[miner2.mytnet.net/sid#7f144e5fdc60][rid#7f144e46c0a0/initial] (2) [perdir 
/data/www/mytwatch/htdocs/] strip document_root prefix: 
/data/www/mytwatch/htdocs/index.php/welcome -> /index.php/welcome
88.162.200.2 - philippe [10/Apr/2012:21:34:17 +0200] 
[miner2.mytnet.net/sid#7f144e5fdc60][rid#7f144e46c0a0/initial] (1) [perdir 
/data/www/mytwatch/htdocs/] internal redirect with /index.php/welcome [INTERNAL 
REDIRECT]
88.162.200.2 - philippe [10/Apr/2012:21:34:17 +0200] 
[miner2.mytnet.net/sid#7f144e5fdc60][rid#7f144e45c540/initial/redir#1] (3) 
[perdir /data/www/mytwatch/htdocs/] add path info postfix: 
/data/www/mytwatch/htdocs/index.php -> 
/data/www/mytwatch/htdocs/index.php/welcome
88.162.200.2 - philippe [10/Apr/2012:21:34:17 +0200] 
[miner2.mytnet.net/sid#7f144e5fdc60][rid#7f144e45c540/initial/redir#1] (3) 
[perdir /data/www/mytwatch/htdocs/] strip per-dir prefix: 
/data/www/mytwatch/htdocs/index.php/welcome -> index.php/welcome
88.162.200.2 - philippe [10/Apr/2012:21:34:17 +0200] 
[miner2.mytnet.net/sid#7f144e5fdc60][rid#7f144e45c540/initial/redir#1] (3) 
[perdir /data/www/mytwatch/htdocs/] applying pattern 
'^(?:application|modules|system)\b' to uri 'index.php/welcome'
88.162.200.2 - philippe [10/Apr/2012:21:34:17 +0200] 
[miner2.mytnet.net/sid#7f144e5fdc60][rid#7f144e45c540/initial/redir#1] (3) 
[perdir /data/www/mytwatch/htdocs/] add path info postfix: 
/data/www/mytwatch/htdocs/index.php -> 
/data/www/mytwatch/htdocs/index.php/welcome
88.162.200.2 - philippe [10/Apr/2012:21:34:17 +0200] 
[miner2.mytnet.net/sid#7f144e5fdc60][rid#7f144e45c540/initial/redir#1] (3) 
[perdir /data/www/mytwatch/htdocs/] strip per-dir prefix: 
/data/www/mytwatch/htdocs/index.php/welcome -> index.php/welcome
88.162.200.2 - philippe [10/Apr/2012:21:34:17 +0200] 
[miner2.mytnet.net/sid#7f144e5fdc60][rid#7f144e45c540/initial/redir#1] (3) 
[perdir /data/www/mytwatch/htdocs/] applying pattern '.*' to uri 
'index.php/welcome'
88.162.200.2 - philippe [10/Apr/2012:21:34:17 +0200] 
[miner2.mytnet.net/sid#7f144e5fdc60][rid#7f144e45c540/initial/redir#1] (1) 
[perdir /data/www/mytwatch/htdocs/] pass through 
/data/www/mytwatch/htdocs/index.php

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: apache2 (not installed)
Uname: Linux 2.6.38.2-grsec-xxxx-grs-ipv6-64 x86_64
Apache2ConfdDirListing: ['other-vhosts-access-log', 'charset', 
'localized-error-pages', 'security']
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
Date: Tue Apr 10 21:24:35 2012
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, no user)
 LANG=fr_FR.UTF-8
SourcePackage: apache2
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.apache2.ports.conf: [modified]
mtime.conffile..etc.apache2.ports.conf: 2012-04-02T21:10:28

** Affects: apache2 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug oneiric

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to apache2 in Ubuntu.
https://bugs.launchpad.net/bugs/978301

Title:
  Apache mod rewrite leads to 404

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/978301/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to