Advertisement
Guest User

Untitled

a guest
Feb 14th, 2013
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. ## redirect from http to https
  2. server {
  3. listen 80 default_server;
  4. server_name site.example.com
  5. www.example.com
  6. example.com;
  7. rewrite ^ https://$server_name$request_uri? permanent;
  8.  
  9. }
  10.  
  11.  
  12. ### HTTPS
  13. server {
  14.  
  15. listen 443 ssl default_server;
  16. ssl on;
  17. ssl_certificate /etc/nginx/cert/_.example.com-chained.pem;
  18. ssl_certificate_key /etc/nginx/cert/_.example.com.key.insecure;
  19. ssl_session_timeout 15m;
  20. ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
  21. ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
  22. ssl_prefer_server_ciphers on;
  23. allow all;
  24. server_name site.example.com _;
  25. root /usr/share/nginx/www/site.example.com/public_html;
  26. index index.php index.html index.htm;
  27.  
  28. access_log /var/log/nginx/site.example.com.access.log;
  29. error_log /var/log/nginx/site.example.com.error.log debug;
  30.  
  31. ### enable php scripts
  32. location ~ \.php$ {
  33. fastcgi_pass 127.0.0.1:9000;
  34. fastcgi_index index.php;
  35. include fastcgi_params;
  36. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  37. }
  38. ###
  39.  
  40.  
  41. }
  42.  
  43. ### END OF HTTPS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement