# nginx_system_test.sh makes a few substitutions to this file to generate # pagespeed_test.conf #user nobody; worker_processes 1; # for debugging #daemon off; #master_process off; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; error_log logs/error.log debug; #pid logs/nginx.pid; events { worker_connections 1024; } http { root "@@SERVER_ROOT@@"; server { listen @@PRIMARY_PORT@@; server_name localhost; pagespeed FileCachePath "@@FILE_CACHE_PATH@@"; # uncomment the following two lines if you're testing memcached #pagespeed MemcachedServers "localhost:11211"; #pagespeed MemcachedThreads 1; pagespeed on; pagespeed RewriteLevel CoreFilters; pagespeed EnableFilters insert_ga,trim_urls; #pagespeed CacheFlushPollIntervalSec 1; #pagespeed RunExperiment on; #pagespeed AnalyticsID "UA-XXXXXXXX-Y"; #pagespeed ExperimentSpec "id=1;percent=50;default"; #pagespeed ExperimentSpec "id=2;percent=50"; pagespeed Library 43 1o978_K0_LNE5_ystNklf http://www.modpagespeed.com/rewrite_javascript.js; # Disable parsing if the size of the HTML exceeds 50kB. pagespeed MaxHtmlParseBytes 50000; location /mod_pagespeed_example/core_filters/ { pagespeed RewriteLevel CoreFilters; } location /mod_pagespeed_example/pass_through/ { pagespeed RewriteLevel PassThrough; } #location / { # proxy_pass http://www.google.com; #} location /mod_pagespeed_test/no_cache/ { add_header Cache-Control no-cache; } location /mod_pagespeed_test/compressed/ { add_header Content-Encoding gzip; types { text/javascript custom_ext; } } pagespeed EnableFilters remove_comments; #charset koi8-r; #access_log logs/host.access.log main; index index.html; #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } sendfile on; keepalive_timeout 65; # set up gzip gzip on; gzip_vary on; # Turn on gzip for all content types that should benefit from it. gzip_types application/ecmascript; gzip_types application/javascript; gzip_types application/json; gzip_types application/pdf; gzip_types application/postscript; gzip_types application/x-javascript; gzip_types image/svg+xml; gzip_types text/css; gzip_types text/csv; # "gzip_types text/html" is assumed. gzip_types text/javascript; gzip_types text/plain; gzip_types text/xml; gzip_http_version 1.0; types { text/html html htm shtml; text/css css; text/xml xml; image/gif gif; image/jpeg jpeg jpg; application/x-javascript js; application/atom+xml atom; application/rss+xml rss; text/mathml mml; text/plain txt; text/vnd.sun.j2me.app-descriptor jad; text/vnd.wap.wml wml; text/x-component htc; image/png png; image/tiff tif tiff; image/vnd.wap.wbmp wbmp; image/x-icon ico; image/x-jng jng; image/x-ms-bmp bmp; image/svg+xml svg svgz; image/webp webp; application/java-archive jar war ear; application/mac-binhex40 hqx; application/msword doc; application/pdf pdf; application/postscript ps eps ai; application/rtf rtf; application/vnd.ms-excel xls; application/vnd.ms-powerpoint ppt; application/vnd.wap.wmlc wmlc; application/vnd.google-earth.kml+xml kml; application/vnd.google-earth.kmz kmz; application/x-7z-compressed 7z; application/x-cocoa cco; application/x-java-archive-diff jardiff; application/x-java-jnlp-file jnlp; application/x-makeself run; application/x-perl pl pm; application/x-pilot prc pdb; application/x-rar-compressed rar; application/x-redhat-package-manager rpm; application/x-sea sea; application/x-shockwave-flash swf; application/x-stuffit sit; application/x-tcl tcl tk; application/x-x509-ca-cert der pem crt; application/x-xpinstall xpi; application/xhtml+xml xhtml; application/zip zip; application/octet-stream bin exe dll; application/octet-stream deb; application/octet-stream dmg; application/octet-stream eot; application/octet-stream iso img; application/octet-stream msi msp msm; audio/midi mid midi kar; audio/mpeg mp3; audio/ogg ogg; audio/x-m4a m4a; audio/x-realaudio ra; video/3gpp 3gpp 3gp; video/mp4 mp4; video/mpeg mpeg mpg; video/quicktime mov; video/webm webm; video/x-flv flv; video/x-m4v m4v; video/x-mng mng; video/x-ms-asf asx asf; video/x-ms-wmv wmv; video/x-msvideo avi; } default_type application/octet-stream; }