Advertisement
hxxxrz

conf ля сайта

Mar 12th, 2018
452
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.07 KB | None | 0 0
  1. server {
  2. listen 78.46.158.46:80;
  3. server_name vds.example.com *.tk *.ml *.ga *.cf *.gq;
  4. root /home/admin/web/vds.example.com/public_html;
  5. index index.php index.html index.htm;
  6. access_log /var/log/nginx/domains/vds.example.com.log combined;
  7. access_log /var/log/nginx/domains/vds.example.com.bytes bytes;
  8. error_log /var/log/nginx/domains/vds.example.com.error.log error;
  9.  
  10. location / {
  11.  
  12. if ($http_user_agent = "") {
  13. access_log off;
  14. return 444;
  15. }
  16.  
  17. if ($blocked_ua = 1) {
  18. access_log off;
  19. return 444;
  20. }
  21.  
  22. index default.htm index.html index.htm index.php;
  23. rewrite ^/([0-9a-z-]+)/$ /index.php?category=$1;
  24. rewrite ^/([0-9a-z-]+)/([0-9]+).html$ /index.php?category=$1&url=$2;
  25. rewrite ^/([0-9a-z-]+)/index.html$ /index.php?category=$1;
  26. rewrite ^/([0-9a-z-]+)/([0-9a-z-]+)/$ /page.php?category=$1&url=$2;
  27. rewrite ^/([0-9a-z-]+)/([0-9a-z-]+)/video/$ /video.php?category=$1&url=$2;
  28. rewrite ^/([0-9a-z-]+)/([0-9a-z-]+)/gallery/$ /gallery.php?category=$1&url=$2;
  29. rewrite ^/([0-9a-z-]+)/([0-9a-z-]+)/images/$ /images.php?category=$1&url=$2;
  30. rewrite ^/([0-9a-z-]+)/([0-9a-z-]+)/vk/$ /vk.php?category=$1&url=$2;
  31.  
  32. location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
  33. expires max;
  34. }
  35.  
  36. location ~ [^/]\.php(/|$) {
  37. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  38. if (!-f $document_root$fastcgi_script_name) {
  39. return 404;
  40. }
  41.  
  42. fastcgi_pass 127.0.0.1:9001;
  43. fastcgi_index index.php;
  44. include /etc/nginx/fastcgi_params;
  45. }
  46.  
  47. }
  48.  
  49. error_page 403 /error/404.html;
  50. error_page 404 /error/404.html;
  51. error_page 500 502 503 504 /error/50x.html;
  52.  
  53. location /error/ {
  54. alias /home/admin/web/vds.example.com/document_errors/;
  55. }
  56.  
  57. location ~* "/\.(htaccess|htpasswd)$" {
  58. deny all;
  59. return 404;
  60. }
  61.  
  62. location /vstats/ {
  63. alias /home/admin/web/vds.example.com/stats/;
  64. include /home/admin/conf/web/vds.example.com.auth*;
  65. }
  66.  
  67. include /etc/nginx/conf.d/phpmyadmin.inc*;
  68. include /etc/nginx/conf.d/phppgadmin.inc*;
  69. include /etc/nginx/conf.d/webmail.inc*;
  70.  
  71. include /home/admin/conf/web/nginx.vds.example.com.conf*;
  72.  
  73. location = /robots.txt {
  74. rewrite ^(.*)$ /robots.php;
  75. }
  76.  
  77. location = /contact.html {
  78. rewrite ^(.*)$ /contact.php;
  79. }
  80.  
  81. location = /rss.xml {
  82. rewrite ^(.*)$ /rss.php;
  83. }
  84.  
  85. location = /sitemap.xml {
  86. rewrite ^(.*)$ /sitemap.php;
  87. }
  88.  
  89. location = /BingSiteAuth.xml {
  90. rewrite ^(.*)$ /BingSiteAuth.php;
  91. }
  92.  
  93. location /google {
  94. rewrite ^/google(.*).html$ /google.php?id=$1;
  95. }
  96.  
  97. location /yandex_ {
  98. rewrite ^/yandex_(.*).html$ /yandex.php?id=$1;
  99. }
  100.  
  101. location /wmail_ {
  102. rewrite ^/wmail_(.*).html$ /wmail.php?id=$1;
  103. }
  104.  
  105. location = /news.html {
  106. rewrite ^(.*)$ /rssparser.php;
  107. }
  108.  
  109. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement