Advertisement
idflorin

Untitled

Apr 4th, 2020
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.60 KB | None | 0 0
  1. server
  2. {
  3. listen 80;
  4. server_name www.spare-wheel.com spare-wheel.com;
  5. return 301 https://www.spare-wheel.com$request_uri;
  6. }
  7. server
  8. {
  9. #listen 80;
  10. listen 443 ssl http2;
  11. server_name www.spare-wheel.com spare-wheel.com;
  12. index index.php index.html index.htm default.php default.htm default.html;
  13. root /www/wwwroot/www.spare-wheel.com;
  14.  
  15. #SSL-START SSL related configuration, do NOT delete or modify the next line of commented-out 404 rules
  16. #error_page 404/404.html;
  17. ssl_certificate /www/server/panel/vhost/cert/www.spare-wheel.com/fullchain.pem;
  18. ssl_certificate_key /www/server/panel/vhost/cert/www.spare-wheel.com/privkey.pem;
  19. ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
  20. ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
  21. ssl_prefer_server_ciphers on;
  22. ssl_session_cache shared:SSL:10m;
  23. ssl_session_timeout 10m;
  24. error_page 497 https://$host$request_uri;
  25.  
  26. #SSL-END
  27.  
  28. #ERROR-PAGE-START Error page configuration, allowed to be commented, deleted or modified
  29. #error_page 404 /404.html;
  30. #error_page 502 /502.html;
  31. #ERROR-PAGE-END
  32.  
  33. #PHP-INFO-START PHP reference configuration, allowed to be commented, deleted or modified
  34. include enable-php-72.conf;
  35. #PHP-INFO-END
  36.  
  37. #REWRITE-START URL rewrite rule reference, any modification will invalidate the rewrite rules set by the panel
  38. include /www/server/panel/vhost/rewrite/www.spare-wheel.com.conf;
  39. #REWRITE-END
  40.  
  41. # Forbidden files or directories
  42. location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)
  43. {
  44. return 404;
  45. }
  46.  
  47. # Directory verification related settings for one-click application for SSL certificate
  48. location ~ \.well-known{
  49. allow all;
  50. }
  51.  
  52. location @rewrite {
  53. # Some modules enforce no slash (/) at the end of the URL
  54. # Else this rewrite block wouldn't be needed (GlobalRedirect)
  55. rewrite ^/(.*)$ /index.php?q=$1;
  56. }
  57.  
  58. # Fighting with ImageCache? This little gem is amazing.
  59. location ~ ^/sites/.*/files/styles/ {
  60. try_files $uri @rewrite;
  61. }
  62. # Fighting with ImageCache? This little gem is amazing.
  63. location ~ ^/files/ {
  64. try_files $uri @rewrite;
  65. }
  66.  
  67. location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  68. {
  69. expires 30d;
  70. error_log off;
  71. access_log off;
  72. }
  73.  
  74. location ~ .*\.(js|css)?$
  75. {
  76. expires 12h;
  77. error_log off;
  78. access_log off;
  79. }
  80. access_log /www/wwwlogs/www.spare-wheel.com.log;
  81. error_log /www/wwwlogs/www.spare-wheel.com.error.log;
  82. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement