Apache2 with PHP FallbackResource doesn't work when Request-URI is / and encoding is gzip

Bug #1168030 reported by Giovanni Lovato

This bug report will be marked for expiration in 5 days if no further activity occurs. (find out why)

This bug affects 2 people
Affects Status Importance Assigned to Milestone
apache2 (Ubuntu)

Bug Description

Installed packages:
apache2-mpm-prefork (2.2.22-6ubuntu2.2)
libapache2-mod-php5 (5.4.6-1ubuntu1.2)

Steps to reproduce:
1. Allow option override on /var/www
2. Remove /var/www/index.html
3. Create /var/www/index.php with any content (e.g. <?php echo $_SERVER['REQUEST_URI']; ?>)
4. Create /var/www/.htaccess with FallbackResource /index.php
5. Go to http://localhost/any -> it works, index.php is called
6. Go to http://localhost/ -> empty response, something went wrong

Either disabling FallbackResource or gzip encoding solve the issue, so I assume is the combination of the two to cause the problem.

Giovanni Lovato (heruan)
description: updated
summary: Apache2 with PHP FallbackResource doesn't work when Request-URI is / and
- Content-Encoding is gzip
+ encoding is gzip
Revision history for this message
Giovanni Lovato (heruan) wrote :

Having "DirectoryIndex index.php" on the .htaccess file solves the issue. It seems the default Apache DirectoryIndex is causing the problem when index.php is not the first default index document.

Robie Basak (racb)
Changed in apache2 (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apache2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Adrien Béraud (aberaud) wrote :

This bug breaks many websites.

Revision history for this message
andreabreaux (andreabreaux) wrote :

Ensure that there are no other .htaccess files in parent directories that might override the settings in /var/www/.htaccess. Conflicting directives in other .htaccess files could potentially cause unexpected behavior. Verify that PHP is properly configured and that there are no issues with executing PHP scripts, especially when accessed through FallbackResource. Create a minimal Apache configuration and .htaccess file with only the necessary directives for FallbackResource and gzip encoding. Then, gradually add back other configurations to identify the specific cause of the issue. https://www-ikrogerfeedback.com

Revision history for this message
Paride Legovini (paride) wrote :

This bug is >10 years old, so we need confirmation from affected users that this is still relevant on supported Ubuntu releases. I'm marking it as Incomplete.

Changed in apache2 (Ubuntu):
status: Confirmed → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.