Advertisement
Guest User

Untitled

a guest
Mar 30th, 2020
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. server {
  2. server_name glamourbrand.in www.glamourbrand.in;
  3. charset utf-8;
  4. index index.php index.html index.htm;
  5.  
  6. set $root /home/centos/html;
  7. root $root;
  8. location /conntrack {
  9. stub_status on;
  10. }
  11.  
  12. location ^~ /.well-known/acme-challenge/ {
  13. default_type "text/plain";
  14. root /tmp;
  15. }
  16.  
  17. add_header X-Frame-Options "SAMEORIGIN";
  18. add_header X-Content-Type-Options nosniff;
  19. add_header X-XSS-Protection "1; mode=block";
  20.  
  21. location / {
  22. include origin.conf;
  23. try_files $uri $uri/ /index.php?$args;
  24. }
  25.  
  26. location ~ \.php$ {
  27. try_files $uri =404;
  28. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  29. fastcgi_pass 127.0.0.1:9000;
  30. fastcgi_index index.php;
  31. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  32. include fastcgi_params;
  33. fastcgi_param GEOIP_COUNTRY_CODE $geoip_country_code;
  34. }
  35.  
  36. location ~* ^/(css|img|js)/(.+)$ {
  37. include origin.conf;
  38. root $root;
  39. }
  40. location ~* \.(png|jpg|ico|js|css)$ {
  41. include origin.conf;
  42. root $root;
  43. }
  44.  
  45. location ~* ^/\.(ini|conf)$ {
  46. return 404;
  47. }
  48. location /var {
  49. return 404;
  50. }
  51. location ~ /\.ht {
  52. return 404;
  53. }
  54. include phpstatus.conf;
  55.  
  56. listen 443 ssl; # managed by Certbot
  57. ssl_certificate /etc/letsencrypt/live/glamourbrand.in/fullchain.pem; # managed by Certbot
  58. ssl_certificate_key /etc/letsencrypt/live/glamourbrand.in/privkey.pem; # managed by Certbot
  59. include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  60. ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  61.  
  62.  
  63.  
  64.  
  65. }
  66. server {
  67. if ($host = glamourbrand.in ) {
  68. return 301 https://$host$request_uri;
  69. } # managed by Certbot
  70.  
  71. if ($host = www.glamourbrand.in ) {
  72. return 301 https://$host$request_uri;
  73. } # managed by Certbot
  74.  
  75. listen 80;
  76. server_name glamourbrand.in www.glamourbrand.in;
  77. return 404; # managed by Certbot
  78.  
  79.  
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement