Advertisement
jbthechamp

varnish-nginx-ssl-config-hitratio-in-varnishstat-high

Dec 1st, 2015
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 2.90 KB | None | 0 0
  1.  
  2. server {
  3.     server_name www.example.com;
  4.     ssl_certificate_key /var/www/example.com/area51/theauthoritativegenerated.key;
  5.     ssl_certificate /var/www/example.com/hopefullystoredstapledandpinnedtoyourbrowsersomyserverloadviasslhandshakedoesntgonuts/themagicsignedcertverifiedbyemailautomaticallyandsubsequentlycharginyour100bucks.crt;
  6.     listen               *:8080;
  7.     listen               *:443 ssl spdy;
  8.     listen               [::]:80 ipv6only=on;
  9.     listen               [::]:443 ssl spdy ipv6only=on;
  10.     return 301 $scheme://www.anothersecurefqdnexample.com$request_uri;
  11. }
  12.  
  13. server {
  14.     server_name          example.com;
  15.     listen               *:8080;
  16.     listen               [::]:8080;
  17.  
  18.     return 301 $scheme://thesecureexample.com$request_uri;
  19. }
  20. server {
  21.     server_name          mail.example.com;
  22.     listen               *:8080;
  23.     listen               [::]:8080;
  24.     ssl off;
  25.     return 302 http://mail.example.com;
  26. }
  27.  
  28.  
  29. server {
  30.   server_name jurisdesk.com ##(need-to-advertise-myboys)##;
  31.   listen               *:443 ssl spdy;
  32.   listen               [::]:443 ssl spdy;
  33.   ssl_stapling on;
  34.   ssl_stapling_verify on;
  35.   resolver 8.8.8.8 8.8.4.4 valid=300s;
  36.   resolver_timeout 5s;
  37.   ssl_certificate_key /var/www/example.com/somesecurearea53location/asillycrytographickeygeneratedbyopensslandsignedbytheinternetpolice.key;
  38.   ssl_certificate /var/www/example.com/therainbowinyourbrowserstorage/acertthatincludedthecacertandforawhoppingaplussslratingrootcert-concencated.crt;
  39.   access_log /var/log/nginx/example.com.access.log jb_cache_redis;
  40.   error_log /var/log/nginx/example.com.error.log;
  41.   root /var/www/example.com/htdocs;
  42.  
  43.   index index.php index.html index.htm;
  44.  
  45.   include  common/wpfc-hhvm.conf;
  46.   include rocket-nginx/rocket-nginx.conf;
  47.  
  48.   include common/wpcommon.conf;
  49.   include common/locations.conf;
  50.  
  51. location ~ /var/www/example.com/htdocs/wp-content/uploads/2015 {
  52.  
  53. location ~ /var/www/example.com/htdocs/wp-content/uploads/2015 {
  54.     proxy_pass http://127.0.0.1:8080;
  55.     proxy_set_header Host $host;
  56.         proxy_set_header X-Real-IP $remote_addr;
  57.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  58.  
  59.         proxy_redirect off;
  60.         proxy_buffering   off;
  61.  
  62.         proxy_http_version 1.1;
  63.         proxy_set_header Upgrade $http_upgrade;
  64.         proxy_set_header Connection "upgrade";
  65.         add_header Access-Control-Allow-Origin "*";
  66. }
  67.   location ~ \.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$ {
  68.           add_header Access-Control-Allow-Origin "*";
  69.           proxy_set_header X-Real-IP $remote_addr;
  70.           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  71.  
  72.           proxy_redirect off;
  73.           proxy_buffering   off;
  74.  
  75.           proxy_http_version 1.1;
  76.           proxy_set_header Upgrade $http_upgrade;
  77.           proxy_set_header Connection "upgrade";
  78.  
  79.           proxy_pass http://127.0.0.1:8080;
  80.  
  81.  }
  82.  
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement