Advertisement
arieonline

default.conf

Mar 19th, 2013
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. #
  2. # The default server
  3. #
  4. server {
  5. listen 80;
  6. server_name umum.com;
  7. rewrite ^ https://$server_name$request_uri? permanent;
  8. }
  9.  
  10. server {
  11. listen 443 default_server;
  12. server_name umum.com;
  13.  
  14. #charset koi8-r;
  15.  
  16. #access_log logs/host.access.log main;
  17. ssl on;
  18. ssl_certificate /etc/nginx/ssl/umum.crt;
  19. ssl_certificate_key /etc/nginx/ssl/umum.key;
  20.  
  21. ssl_session_timeout 5m;
  22.  
  23. ssl_protocols SSLv2 SSLv3 TLSv1;
  24. ssl_ciphers HIGH:!aNULL:!MD5;
  25. ssl_prefer_server_ciphers on;
  26.  
  27. location / {
  28. root /usr/share/nginx/html/;
  29. index index.php index.html index.htm;
  30. }
  31.  
  32.  
  33. error_page 404 /404.html;
  34. location = /404.html {
  35. root /usr/share/nginx/html;
  36. }
  37.  
  38. # redirect server error pages to the static page /50x.html
  39. #
  40. error_page 500 502 503 504 /50x.html;
  41. location = /50x.html {
  42. root /usr/share/nginx/html;
  43. }
  44.  
  45. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  46. #
  47. #location ~ \.php$ {
  48. # proxy_pass http://127.0.0.1;
  49. #}
  50.  
  51. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  52. #
  53. location ~ \.php$ {
  54. root /usr/share/nginx/html;
  55. try_files $uri =404;
  56. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  57. fastcgi_pass 127.0.0.1:9000;
  58. fastcgi_index index.php;
  59. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  60. include fastcgi_params;
  61. }
  62.  
  63. # deny access to .htaccess files, if Apache's document root
  64. # concurs with nginx's one
  65. #
  66. # location /nginx-status {
  67. # stub_status on;
  68. # access_log off;
  69. # allow 127.0.0.1;
  70. #deny all;
  71. # }
  72.  
  73. location ~ /\.ht {
  74. deny all;
  75. }
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement