Guest User

Untitled

a guest
Dec 16th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.60 KB | None | 0 0
  1.  
  2. #user nobody;
  3. worker_processes 1;
  4.  
  5. #error_log logs/error.log;
  6. #error_log logs/error.log notice;
  7. #error_log logs/error.log info;
  8.  
  9. #pid logs/nginx.pid;
  10.  
  11.  
  12. events {
  13. worker_connections 1024;
  14. }
  15.  
  16.  
  17. http {
  18. include mime.types;
  19. default_type application/octet-stream;
  20.  
  21. #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  22. # '$status $body_bytes_sent "$http_referer" '
  23. # '"$http_user_agent" "$http_x_forwarded_for"';
  24.  
  25. #access_log logs/access.log main;
  26. charset UTF-8;
  27.  
  28. sendfile on;
  29. tcp_nopush on;
  30.  
  31. #keepalive_timeout 0;
  32. keepalive_timeout 30;
  33.  
  34. gzip on;
  35. gzip_vary on;
  36.  
  37. gzip_comp_level 6;
  38. gzip_buffers 16 8k;
  39.  
  40. gzip_min_length 1000;
  41. gzip_proxied any;
  42. gzip_disable "msie6";
  43.  
  44. gzip_http_version 1.0;
  45.  
  46. gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript image/svg+xml;
  47.  
  48. server {
  49. listen 80 ;
  50. server_name www.example.com example.com;
  51. # Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response.
  52. return 301 https://$host$request_uri;
  53. }
  54.  
  55.  
  56. server {
  57. # listen 80 ;
  58. listen 443 ssl ;
  59. # listen 443 443 ssl http2 fastopen=3 reuseport;
  60.  
  61. server_name www.example.com example.com;
  62.  
  63. ssl_certificate /etc/letsencrypt/live/www.example.com/fullchain.pem;
  64. ssl_certificate_key /etc/letsencrypt/live/www.example.com/privkey.pem;
  65. ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
  66.  
  67. ssl_session_timeout 5m;
  68.  
  69. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  70. ssl_session_tickets off;
  71. ssl_prefer_server_ciphers on;
  72. ssl_session_cache shared:SSL:10m;
  73. ssl_stapling on;
  74. ssl_stapling_verify on;
  75. # if ($host != 'www.example.com' ) {
  76. # rewrite ^/(.*)$ https://www.example.com/$1 permanent;
  77. # }
  78.  
  79. location / {
  80.  
  81. # proxy_set_header Host www.example.com;
  82. # proxy_set_header X-Real-IP $remote_addr;
  83. # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  84. proxy_pass http://example.com:8088;
  85. }
  86. }
  87. }
Add Comment
Please, Sign In to add comment