Al0rse

www.viventoura.de.conf

Jul 13th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.26 KB | None | 0 0
  1. server {
  2. listen 80;
  3. server_name viventoura.de;
  4. if ($request_method != POST ) {
  5. return 301 http://www.$server_name$request_uri;
  6. }
  7. location / {
  8. root /usr/share/nginx/html/sites/viventura/prod/web;
  9. index index.php index.html index.htm;
  10. try_files $uri $uri/ /index.php?$args;
  11. }
  12. location ~ \.php$ {
  13. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  14. fastcgi_pass 127.0.0.1:9000;
  15. fastcgi_index index.php;
  16. fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/sites/viventura/prod/web$fastcgi_script_name;
  17. include fastcgi_params;
  18. }
  19. }
  20.  
  21. server {
  22. listen 80;
  23. server_name www.viventoura.de;
  24. # if ($request_method != POST ) {
  25. # return 301 https://www.$server_name$request_uri;
  26. # }
  27. location / {
  28. root /usr/share/nginx/html/sites/viventura/prod/web;
  29. index index.php index.html index.htm;
  30. try_files $uri $uri/ /index.php?$args;
  31. }
  32. location ~ \.php$ {
  33. #try_files $uri /index.php =404;
  34. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  35. fastcgi_pass 127.0.0.1:9000;
  36. fastcgi_index index.php;
  37. fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/sites/viventura/prod/web$fastcgi_script_name;
  38. include fastcgi_params;
  39. }
  40. }
  41. server {
  42. listen 443 ssl;
  43. server_name www.viventoura.de;
  44. access_log /var/log/nginx/www.viventoura.de.access.log;
  45. error_log /var/log/nginx/www.viventoura.de.error.log;
  46.  
  47. add_header Strict-Transport-Security "max-age=31536000";
  48. ssl_certificate /etc/letsencrypt/live/www.viventoura.de/fullchain.pem;
  49. ssl_certificate_key /etc/letsencrypt/live/www.viventoura.de/privkey.pem;
  50. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  51. ssl_prefer_server_ciphers on;
  52. ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH:AES256+ECDHE';
  53. ssl_dhparam /etc/nginx/dhparams.pem;
  54.  
  55. location / {
  56. root /usr/share/nginx/html/sites/viventura/prod/web;
  57. index index.php index.html index.htm;
  58. try_files $uri $uri/ /index.php?$args;
  59. }
  60.  
  61. location ~ ^/go(.*) {
  62. autoindex off;
  63. rewrite .* /backend.php last;
  64. }
  65.  
  66. error_page 500 502 503 504 /50x.html;
  67. location = /50x.html {
  68. root /usr/share/nginx/html;
  69. }
  70. location ~ \.php$ {
  71. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  72. fastcgi_pass 127.0.0.1:9000;
  73. fastcgi_index index.php;
  74. fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/sites/viventura/prod/web$fastcgi_script_name;
  75. include fastcgi_params;
  76. }
  77. # Media: images, icons, video, audio, HTC
  78. location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
  79. root /usr/share/nginx/html/sites/viventura/prod/web;
  80. expires 10y;
  81. access_log off;
  82. add_header Cache-Control "public";
  83. }
  84. # CSS and Javascript
  85. location ~* \.(?:css|js|jsx)$ {
  86. root /usr/share/nginx/html/sites/viventura/prod/web;
  87. expires 1M;
  88. access_log off;
  89. add_header Cache-Control "public";
  90. }
  91. include /etc/nginx/sites-available/viventura.de.redirect.conf;
  92. }
Add Comment
Please, Sign In to add comment