Guest User

Untitled

a guest
Oct 31st, 2015
84
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. server {
  2. listen 80 default_server;
  3. server_name _;
  4. rewrite ^ https://$http_host$request_uri? permanent;
  5. }
  6.  
  7. server {
  8. listen 443 ssl http2 default_server;
  9. ssl on;
  10. ssl_certificate /etc/nginx/cacert.pem; # path to your cacert.pem
  11. ssl_certificate_key /etc/nginx/privkey.pem; # path to your privkey.pem
  12. server_name _;
  13. # proxy_set_header X-Forwarded-For $remote_addr;
  14. # add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
  15.  
  16. pagespeed on;
  17. server_name _;
  18. root /var/www/html;
  19.  
  20. index index.php index.html index.htm index.nginx-debian.html ;
  21.  
  22. location / {
  23. try_files $uri $uri/ =404;
  24. }
  25.  
  26. location ~ \.php$ {
  27. try_files $uri =404;
  28. fastcgi_pass unix:/var/run/php5-fpm.sock;
  29. fastcgi_index index.php;
  30. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  31. include fastcgi_params;
  32. }
  33. }
RAW Paste Data