Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Make sure everything redirects to https if accessed by port 80
- <VirtualHost *:80>
- ServerAdmin "[email protected]"
- DocumentRoot /home/kees/sites/some-website.com/public_html
- ServerName some-website.com
- ServerAlias www.some-website.com
- <Directory /home/kees/sites/some-website.com/public_html>
- AllowOverride All
- Allow from All
- </Directory>
- Redirect permanent / https://polyestershoppen.nl/
- </VirtualHost>
- <VirtualHost *:4000>
- ServerAdmin "[email protected]"
- DocumentRoot /home/kees/sites/some-website.com/public_html
- ServerName some-website.com
- ServerAlias www.some-website.com
- <Directory /home/kees/sites/some-website.com/public_html>
- AllowOverride All
- Allow from all
- </Directory>
- </VirtualHost>
- ## And make sure you add these somewhere in your ports.conf or any other 'global' configuration:
- Listen 4000
- NameVirtualHost *:4000
- ### MOD PAGESPEED CONFIG ###
- <IfModule pagespeed_module>
- ModPagespeed on
- AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html
- AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER application/xhtml+xml
- ModPagespeedFileCachePath "/var/mod_pagespeed/cache/"
- ModPagespeedGeneratedFilePrefix "/var/mod_pagespeed/files/"
- ModPagespeedAvoidRenamingIntrospectiveJavascript on
- ModPagespeedEnableFilters collapse_whitespace
- ModPagespeedEnableFilters elide_attributes
- ModPagespeedEnableFilters collapse_whitespace
- ModPagespeedEnableFilters combine_css
- ModPagespeedEnableFilters combine_javascript
- ModPagespeedEnableFilters rewrite_css
- ModPagespeedEnableFilters rewrite_javascript
- ModPagespeedEnableFilters rewrite_images
- ModPagespeedEnableFilters remove_comments
- ModPagespeedEnableFilters insert_image_dimensions
- ModPagespeedEnableFilters trim_urls
- ModPagespeedDisableFilters extend_cache
- ModPagespeedDisallow */tiny_mce.js
- ModPagespeedDisallow */highchart*
- ModPagespeedDisallow */munin/*
- ModPagespeedDisallow */roundcube/*
- <Location /mod_pagespeed_beacon>
- SetHandler mod_pagespeed_beacon
- </Location>
- # 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
- SetHandler mod_pagespeed_statistics
- </Location>
- ModPagespeedMessageBufferSize 100000
- <Location /mod_pagespeed_message>
- Allow from localhost
- Allow from 127.0.0.1
- SetHandler mod_pagespeed_message
- </Location>
- <Location /mod_pagespeed_referer_statistics>
- Allow from localhost
- Allow from 127.0.0.1
- SetHandler mod_pagespeed_referer_statistics
- </Location>
- </IfModule>
- ### NGINX VIRTUAL HOST###
- server {
- listen 443 ssl;
- server_name www.some-website.com;
- ssl_certificate /etc/ssl/certs/www_some-website_com.chained.crt;
- ssl_certificate_key /etc/ssl/certs/www_some-website_com_nopassword.key;
- ssl_session_timeout 5m;
- ssl_protocols SSLv2 SSLv3 TLSv1;
- keepalive_timeout 60;
- location / {
- proxy_pass http://www.some-website.com:4000;
- ### force timeouts if one of backend is died ##
- proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
- ### Set headers ####
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- ### Most PHP, Python, Rails, Java App can use this header ###
- proxy_set_header X-Forwarded-Proto https;
- ### By default we don't want to redirect it ####
- proxy_redirect off;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment