Mod_pagespeed avec Zend Framework donne 404

Je suis en train d'expédier quelques problèmes avec le module Apache mod_pagespeed de Google pour combiner css, js, etc. Au cours des derniers mois, j'ai développé une nouvelle version de notre logiciel basée sur Zend Framework. Je viens d'installer mod_pagespeed et ça ne semble pas fonctionner.

Je lance Ubuntu Server 11.04 et le dernier module mod_pagespeed. J'utilise Zend Framework 1.11.11 et j'exécute PHP 5.3.3 avec Apache 2.

Lorsque j'ai mis mon Apache LogLevel dans "debug", je reçois les messages suivants:

[Mon Jul 16 10:44:53 2012] [debug] net/instaweb/apache/mod_instaweb.cc(370): [client 217.196.45.116] ModPagespeed OutputFilter called for request /index.php [Mon Jul 16 10:44:53 2012] [debug] net/instaweb/apache/mod_instaweb.cc(391): [client 217.196.45.116] Request not rewritten because: request->status != 200 (was 404) 

Lorsque vous accédez à une URL comme: http://development.domain.nl/filter/fietsslot-1967/

Je reçois les erreurs ci-dessus. Cela pourrait être causé, je réécris tous les appels à index.php comme conseillé par Zend Framework:

 RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] <FilesMatch "\.(jpg|jpeg|png|gif|swf|js|css)$"> Header set Cache-Control "max-age=604800, public" </FilesMatch> Header unset ETag 

Il semble donc que mod_pagespeed lance un appel «sous-jacent» sur la même page, mais pas avec l'URL d'origine, mais la version résolue.

Si je pars sur cette URL: http://development.domain.nl/index.php

Je reçois en effet un 404 parce que Zend Framework ne sait pas quoi faire (auquel contrôle / action est accessible).

Que devrais-je faire? Merci d'avance!

Ma configuration Mod_Pagespeed:

 <IfModule pagespeed_module> # Turn on mod_pagespeed. To completely disable mod_pagespeed, you # can set this to "off". ModPagespeed on # Direct Apache to send all HTML output to the mod_pagespeed # output handler. AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html # If you want mod_pagespeed process XHTML as well, please uncomment this # line. # AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER application/xhtml+xml # The ModPagespeedFileCachePath and # ModPagespeedGeneratedFilePrefix directories must exist and be # writable by the apache user (as specified by the User # directive). ModPagespeedFileCachePath "/var/mod_pagespeed/cache/" ModPagespeedGeneratedFilePrefix "/var/mod_pagespeed/files/" # Override the mod_pagespeed 'rewrite level'. The default level # "CoreFilters" uses a set of rewrite filters that are generally # safe for most web pages. Most sites should not need to change # this value and can instead fine-tune the configuration using the # ModPagespeedDisableFilters and ModPagespeedEnableFilters # directives, below. Valid values for ModPagespeedRewriteLevel are # PassThrough, CoreFilters and TestingCoreFilters. # # ModPagespeedRewriteLevel PassThrough # Explicitly disables specific filters. This is useful in # conjuction with ModPagespeedRewriteLevel. For instance, if one # of the filters in the CoreFilters needs to be disabled for a # site, that filter can be added to # ModPagespeedDisableFilters. This directive contains a # comma-separated list of filter names, and can be repeated. # # ModPagespeedDisableFilters rewrite_images # Explicitly enables specific filters. This is useful in # conjuction with ModPagespeedRewriteLevel. For instance, filters # not included in the CoreFilters may be enabled using this # directive. This directive contains a comma-separated list of # filter names, and can be repeated. # # ModPagespeedEnableFilters rewrite_javascript,rewrite_css # ModPagespeedEnableFilters collapse_whitespace,elide_atsortingbutes ModPagespeedRewriteLevel CoreFilters ModPagespeedEnableFilters collapse_whitespace ModPagespeedEnableFilters elide_atsortingbutes ModPagespeedEnableFilters collapse_whitespace ModPagespeedEnableFilters extend_cache ModPagespeedEnableFilters combine_css ModPagespeedEnableFilters combine_javascript ModPagespeedEnableFilters rewrite_css ModPagespeedEnableFilters rewrite_javascript ModPagespeedEnableFilters rewrite_images ModPagespeedEnableFilters remove_comments ModPagespeedEnableFilters insert_image_dimensions ModPagespeedDisallow */tiny_mce.js ModPagespeedDisallow */munin/* # ModPagespeedDomain # authorizes rewriting of JS, CSS, and Image files found in this # domain. By default only resources with the same origin as the # HTML file are rewritten. For example: # # ModPagespeedDomain cdn.myhost.com # # This will allow resources found on http://cdn.myhost.com to be # rewritten in addition to those in the same domain as the HTML. # # Wildcards (* and ?) are allowed in the domain specification. Be # careful when using them as if you rewrite domains that do not # send you traffic, then the site receiving the traffic will not # know how to serve the rewritten content. # Other defaults (cache sizes and thresholds): # # ModPagespeedFileCacheSizeKb 102400 # ModPagespeedFileCacheCleanIntervalMs 3600000 # ModPagespeedLRUCacheKbPerProcess 1024 # ModPagespeedLRUCacheByteLimit 16384 # ModPagespeedCssInlineMaxBytes 2048 # ModPagespeedImageInlineMaxBytes 2048 # ModPagespeedCssImageInlineMaxBytes 2048 # ModPagespeedJsInlineMaxBytes 2048 # ModPagespeedCssOutlineMinBytes 3000 # ModPagespeedJsOutlineMinBytes 3000 # Bound the number of images that can be rewritten at any one time; this # avoids overloading the CPU. Set this to 0 to remove the bound. # # ModPagespeedImageMaxRewritesAtOnce 8 # You can also customize the number of threads per Apache process # mod_pagespeed will use to do resource optimization. Plain # "rewrite threads" are used to do short, latency-sensitive work, # while "expensive rewrite threads" are used for actual optimization # work that's more computationally expensive. If you live these unset, # or use values <= 0 the defaults will be used, which is 1 for both # values when using non-threaded MPMs (eg prefork) and 4 for both # on threaded MPMs (eg worker and event). These settings can only # be changed globally, and not per virtual host. # # ModPagespeedNumRewriteThreads 4 # ModPagespeedNumExpensiveRewriteThreads 4 # Settings for image optimization: # # Jpeg recompression quality (0 to 100, -1 ssortingps metadata): # ModPagespeedJpegRecompressionQuality -1 # # Percent of original image size below which optimized images are retained: # ModPagespeedImageLimitOptimizedPercent 100 # # Percent of original image area below which image resizing will be # attempted: # ModPagespeedImageLimitResizeAreaPercent 100 # When Apache is set up as a browser proxy, mod_pagespeed can record # web-sites as they are requested, so that an image of the web is built up # in the directory of the proxy administrator's choosing. When ReadOnly is # on, only files already present in the SlurpDirectory are served by the # proxy. # # ModPagespeedSlurpDirectory ... # ModPagespeedSlurpReadOnly on # The maximum URL size is generally limited to about 2k characters # due to IE: See http://support.microsoft.com/kb/208427/EN-US. # Apache servers by default impose a further limitation of about # 250 characters per URL segment (text between slashes). # mod_pagespeed circumvents this limitation, but if you employ # proxy servers in your path you may need to re-impose it by # overriding the setting here. The default setting is 1024 # characters. # # ModPagespeedMaxSegmentLength 250 # Uncomment this if you want to prevent mod_pagespeed from combining files # (eg CSS files) across paths # # ModPagespeedCombineAcrossPaths off # Renaming JavaScript URLs can sometimes break them. With this # option enabled, mod_pagespeed uses a simple heuristic to decide # not to rename JavaScript that it thinks is introspective. # # You can turn this off to let mod_pagespeed rename all JS files. ModPagespeedAvoidRenamingIntrospectiveJavascript on # Explicitly tell mod_pagespeed to load some resources from disk. # This will speed up load time and update frequency. # # This should only be used for static resources which do not need # specific headers set or other processing by Apache. # # Both URL and filesystem path should specify directories and # filesystem path must be absolute (for now). # # ModPagespeedLoadFromFile "http://example.com/static/" "/var/www/static/" # Enables server-side instrumentation and statistics. If this rewriter is # enabled, then each rewritten HTML page will have instrumentation javacript # added that sends latency beacons to /mod_pagespeed_beacon. These # statistics can be accessed at /mod_pagespeed_statistics. You must also # enable the mod_pagespeed_statistics and mod_pagespeed_beacon handlers # below. # # ModPagespeedEnableFilters add_instrumentation # The add_instrumentation filter sends a beacon after the page onload # handler is called. The user might navigate to a new URL before this. If # you enable the following directive, the beacon is sent as part of an # onbeforeunload handler, for pages where navigation happens before the # onload event. # # ModPagespeedReportUnloadTime on # Uncomment the following line so that ModPagespeed will not cache or # rewrite resources with Vary: in the header, eg Vary: User-Agent. # ModPagespeedRespectVary on # This handles the client-side instrumentation callbacks which are injected # by the add_instrumentation filter. # You can use a different location by adding the ModPagespeedBeaconUrl # directive; see the documentation on add_instrumentation. <Location /mod_pagespeed_beacon> SetHandler mod_pagespeed_beacon </Location> # Uncomment the following line if you want to disable statistics entirely. # # ModPagespeedStatistics off # This page lets you view statistics about the mod_pagespeed module. <Location /mod_pagespeed_statistics> Order allow,deny # You may insert other "Allow from" lines to add hosts you want to # allow to look at generated statistics. Another possibility is # to comment out the "Order" and "Allow" options from the config # file, to allow any client that can reach your server to examine # statistics. This might be appropriate in an experimental setup or # if the Apache server is protected by a reverse proxy that will # filter URLs in some fashion. Allow from localhost Allow from 127.0.0.1 Allow from 217.196.45.116 #TMG SetHandler mod_pagespeed_statistics </Location> # Page /mod_pagespeed_message lets you view the latest messages from # mod_pagespeed, regardless of log-level in your httpd.conf # ModPagespeedMessageBufferSize is the maximum number of bytes you would # like to dump to your /mod_pagespeed_message page at one time, # its default value is 100k bytes. # Set it to 0 if you want to disable this feature. ModPagespeedMessageBufferSize 100000 <Location /mod_pagespeed_message> Allow from localhost Allow from 127.0.0.1 Allow from 217.196.45.116 #TMG SetHandler mod_pagespeed_message </Location> <Location /mod_pagespeed_referer_statistics> Allow from localhost Allow from 127.0.0.1 Allow from 217.196.45.116 #TMG SetHandler mod_pagespeed_referer_statistics </Location> </IfModule> 

  • Zend 1 sur Ubuntu avec MSSQL ne fonctionnant pas
  • Besoin de l'équivalent SCRIPT_URL d'Apache dans nginx + php-fpm
  • Ubuntu ajoute des commands au bash
  • Comment supprimer require_once appels dans un directory (Win)
  • Installation de Zend Framework GData sur hôte partagé
  • J'ai 500 erreurs sur http: // localhost / zftutorial / public
  • procmail n'exécute pas le script php
  • Magento Community - Hosting :: Besoin de conseils pour partager l'hébergement sera magento rapide
  • Définir le timezone dans MySQL sur chaque connection utilisant Zend PHP
  • Comment puis-je déployer deux applications zend frame work based dans apache2 comme celle de Tomcat
  • Déménagement de Zend Framework 2 d'apache à nginx
  • Les astuces du serveur de linux et windows, tels que ubuntu, centos, apache, nginx, debian et des sujets de rĂ©seau.