Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.97 KB | None | 0 0
  1. server {
  2. server_name mysite.gr www.mysite.gr;
  3. charset off;
  4. index index.php;
  5. disable_symlinks if_not_owner from=$root_path;
  6. include /etc/nginx/vhosts-includes/*.conf;
  7. include /etc/nginx/vhosts-resources/mysite.gr/*.conf;
  8. access_log /var/www/httpd-logs/mysite.gr.access.log;
  9. error_log /var/www/httpd-logs/mysite.gr.error.log notice;
  10. ssi on;
  11. set $root_path /var/www/mysite/data/www/mysite.gr;
  12. root $root_path;
  13. listen 163.172.109.14:80;
  14. include /etc/nginx/vhosts-resources/mysite/*.conf;
  15. location / {
  16. location ~ [^/]\.ph(p\d*|tml)$ {
  17. try_files /does_not_exists @fallback;
  18. }
  19. location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
  20. try_files $uri $uri/ @fallback;
  21. }
  22. location / {
  23. try_files /does_not_exists @fallback;
  24. }
  25. }
  26. location @fallback {
  27. proxy_pass http://127.0.0.1:8080;
  28. proxy_redirect http://127.0.0.1:8080 /;
  29. proxy_set_header Host $host;
  30. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  31. proxy_set_header X-Forwarded-Proto $scheme;
  32. proxy_set_header X-Forwarded-Port $server_port;
  33. }
  34. gzip on;
  35. gzip_comp_level 4;
  36. gzip_disable "msie6";
  37. gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
  38. return 301 https://$host:443$request_uri;
  39. }
  40. server {
  41. server_name mysite.gr www.mysite.gr;
  42. ssl on;
  43. ssl_certificate "/var/www/httpd-cert/mysite/mysite.gr_le2.crtca";
  44. ssl_certificate_key "/var/www/httpd-cert/mysite/mysite.gr_le2.key";
  45. charset off;
  46. index index.php;
  47. disable_symlinks if_not_owner from=$root_path;
  48. include /etc/nginx/vhosts-includes/*.conf;
  49. include /etc/nginx/vhosts-resources/mysite.gr/*.conf;
  50. access_log /var/www/httpd-logs/mysite.gr.access.log;
  51. error_log /var/www/httpd-logs/mysite.gr.error.log notice;
  52. ssi on;
  53. set $root_path /var/www/mysite/data/www/mysite.gr;
  54. root $root_path;
  55. listen 163.172.109.14:443;
  56. include /etc/nginx/vhosts-resources/mysite/*.conf;
  57. location / {
  58. location ~ [^/]\.ph(p\d*|tml)$ {
  59. try_files /does_not_exists @fallback;
  60. }
  61. location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
  62. try_files $uri $uri/ @fallback;
  63. }
  64. location / {
  65. try_files /does_not_exists @fallback;
  66. }
  67. }
  68. location @fallback {
  69. proxy_pass http://127.0.0.1:8080;
  70. proxy_redirect http://127.0.0.1:8080 /;
  71. proxy_set_header Host $host;
  72. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  73. proxy_set_header X-Forwarded-Proto $scheme;
  74. proxy_set_header X-Forwarded-Port $server_port;
  75. }
  76. gzip on;
  77. gzip_comp_level 4;
  78. gzip_disable "msie6";
  79. gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
  80. ssl_ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;
  81. ssl_prefer_server_ciphers on;
  82. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  83. add_header Strict-Transport-Security "max-age=31536000;";
  84. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement