Advertisement
id26327371

Untitled

Jul 19th, 2016
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.20 KB | None | 0 0
  1. cat /home/admin/conf/web/nginx.conf
  2. server {
  3. listen 127.0.0.1;
  4. server_name localhost;
  5. location /nginx_status {
  6. stub_status on;
  7. access_log off;
  8. allow 127.0.0.1;
  9. allow 92.60.185.77;
  10. allow 176.36.183.36;
  11. deny all;
  12. }
  13. }
  14.  
  15.  
  16. server {
  17. listen 443;
  18. ssl on;
  19. ssl_certificate /etc/ssl/goldwell.pp.ua_bundle.crt;
  20. ssl_certificate_key /etc/ssl/goldwell.pp.ua.key;
  21. server_name goldwell.pp.ua;
  22. access_log /var/log/nginx/nginx.vhost.access.log;
  23. error_log /var/log/nginx/nginx.vhost.error.log;
  24. location / {
  25. root /home/admin/web/goldwell.pp.ua/public_shtml;
  26. index index.html;
  27. }
  28. }
  29.  
  30. server {
  31. listen 94.23.162.51:80;
  32. server_name www.goldwell.pp.ua;
  33. return 301 http://goldwell.pp.ua$request_uri;
  34. }
  35.  
  36. server {
  37. listen 94.23.162.51:80;
  38. server_name goldwell.pp.ua;
  39. root /home/admin/web/goldwell.pp.ua/public_html;
  40. index index.php index.html index.htm;
  41. access_log /var/log/nginx/domains/goldwell.pp.ua.log combined;
  42. access_log /var/log/nginx/domains/goldwell.pp.ua.bytes bytes;
  43. error_log /var/log/nginx/domains/goldwell.pp.ua.error.log error;
  44.  
  45.  
  46.  
  47.  
  48. rewrite ^([^.\?]*[^/])$ $1/ permanent;
  49.  
  50.  
  51.  
  52.  
  53.  
  54. location /munin {
  55. alias /var/www/html/munin/;
  56. allow 127.0.0.1;
  57. allow 92.60.185.77;
  58. allow 176.36.183.36;
  59. deny all;
  60. # index index.html;
  61. location ~* \.(png|jpg|jpeg|gif|ico)$ {
  62. }
  63. }
  64.  
  65.  
  66. location ~ \.(tpl|ini|log) {
  67. deny all;
  68. }
  69.  
  70.  
  71.  
  72.  
  73.  
  74. location ~ ^/(status|ping)$ {
  75. fastcgi_pass 127.0.0.1:9002;
  76. fastcgi_index index.php;
  77. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  78. include fastcgi_params;
  79. access_log off;
  80. allow 127.0.0.1;
  81. allow 92.60.185.77;
  82. deny all;
  83. }
  84.  
  85.  
  86. location /nginx_status {
  87. stub_status on;
  88. access_log off;
  89. allow 127.0.0.1;
  90. allow 92.60.185.77;
  91. allow 176.36.183.36;
  92. deny all;
  93. }
  94.  
  95.  
  96.  
  97. location /download {
  98. alias /index.php?route=error/not_found;
  99. }
  100.  
  101.  
  102.  
  103.  
  104.  
  105. location = /sitemap.xml {
  106. rewrite ^(.*)$ /index.php?route=feed/fast_sitemap;
  107. }
  108.  
  109.  
  110.  
  111.  
  112.  
  113. ###############################
  114.  
  115.  
  116.  
  117. location / {
  118.  
  119. location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
  120. expires max;
  121. }
  122.  
  123. location ~ [^/]\.php(/|$) {
  124. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  125. if (!-f $document_root$fastcgi_script_name) {
  126. return 404;
  127. }
  128.  
  129. fastcgi_pass 127.0.0.1:9002;
  130. fastcgi_index index.php;
  131. include /etc/nginx/fastcgi_params;
  132. }
  133.  
  134. }
  135.  
  136. error_page 403 /error/404.html;
  137. error_page 404 /index.php?route=error/not_found;
  138. error_page 500 502 503 504 /error/50x.html;
  139.  
  140. location /error/ {
  141. alias /home/admin/web/goldwell.pp.ua/document_errors/;
  142. }
  143.  
  144. location ~* "/\.(htaccess|htpasswd)$" {
  145. deny all;
  146. return 404;
  147. }
  148.  
  149.  
  150. include /etc/nginx/conf.d/phpmyadmin.inc*;
  151. include /etc/nginx/conf.d/phppgadmin.inc*;
  152. include /etc/nginx/conf.d/webmail.inc*;
  153.  
  154. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement