Advertisement
Guest User

Untitled

a guest
Feb 2nd, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1. [root@digiocean home]# nginx -t
  2. nginx: [emerg] invalid parameter "http2" in /etc/nginx/conf.d/withingscoupon.net.conf:2
  3. nginx: configuration file /etc/nginx/nginx.conf test failed
  4.  
  5. [root@digiocean home]# nginx -v
  6. nginx version: nginx/1.8.0
  7.  
  8. server {
  9. listen 443 ssl http2;
  10. server_name www.withingscoupon.net;
  11.  
  12. # SSL
  13. ssl_certificate /etc/letsencrypt/live/withingscoupon.net/fullchain.pem;
  14. ssl_certificate_key /etc/letsencrypt/live/withingscoupon.net/privkey.pe$
  15. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  16. ssl_prefer_server_ciphers on;
  17. ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES$
  18.  
  19. rewrite ^(.*) https://withingscoupon.net$1 permanent;
  20. }
  21. server {
  22. listen 80;
  23. server_name withingscoupon.net www.withingscoupon.net;
  24. rewrite ^(.*) https://withingscoupon.net$1 permanent;
  25. }
  26. server {
  27. listen 443 ssl http2;
  28.  
  29. access_log off;
  30. # access_log /home//logs/access.log;
  31. error_log off;
  32. # error_log /home/withingscoupon.net/logs/error.log;
  33. root /home/withingscoupon.net/public_html;
  34. index index.php index.html index.htm;
  35. server_name withingscoupon.net;
  36. # SSL
  37. ssl_certificate /etc/letsencrypt/live/withingscoupon.net/fullchain.pem;
  38. ssl_certificate_key /etc/letsencrypt/live/withingscoupon.net/privkey.pe$
  39. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  40. ssl_prefer_server_ciphers on;
  41. ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES$
  42.  
  43. # Improve HTTPS performance with session resumption
  44. ssl_session_cache shared:SSL:50m;
  45. ssl_session_timeout 1d;
  46.  
  47.  
  48. # DH parameters
  49. ssl_dhparam /etc/nginx/cert/dhparam.pem;
  50.  
  51. # Enable HSTS (https://developer.mozilla.org/en-US/docs/Security/HTTP_S$
  52. add_header Strict-Transport-Security "max-age=31536000" always;
  53. location / {
  54. try_files $uri $uri/ /index.php?$args;
  55. }
  56.  
  57. location ~ \.php$ {
  58. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  59. include /etc/nginx/fastcgi_params;
  60. fastcgi_pass 127.0.0.1:9000;
  61. fastcgi_index index.php;
  62. fastcgi_connect_timeout 300;
  63. fastcgi_send_timeout 300;
  64. fastcgi_read_timeout 300;
  65. fastcgi_buffer_size 32k;
  66. fastcgi_buffers 8 16k;
  67. fastcgi_busy_buffers_size 32k;
  68. fastcgi_temp_file_write_size 32k;
  69. fastcgi_intercept_errors on;
  70. fastcgi_param SCRIPT_FILENAME /home/withingscoupon.net/public_h$
  71. }
  72. location ~ /\. {
  73. deny all;
  74. }
  75. location = /favicon.ico {
  76. log_not_found off;
  77. access_log off;
  78. }
  79. location = /robots.txt {
  80. allow all;
  81. log_not_found off;
  82. access_log off;
  83. }
  84. location ~* \.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pl$
  85. gzip_static off;
  86. add_header Pragma public;
  87. add_header Cache-Control "public, must-revalidate, proxy-revali$
  88. access_log off;
  89. expires 30d;
  90. break;
  91. }
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement