Guest User

Untitled

a guest
May 15th, 2017
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.85 KB | None | 0 0
  1. # You may add here your
  2. # server {
  3. # ...
  4. # }
  5. # statements for each of your virtual hosts to this file
  6.  
  7. ##
  8. # You should look at the following URL's in order to grasp a solid understanding
  9. # of Nginx configuration files in order to fully unleash the power of Nginx.
  10. # http://wiki.nginx.org/Pitfalls
  11. # http://wiki.nginx.org/QuickStart
  12. # http://wiki.nginx.org/Configuration
  13. #
  14. # Generally, you will want to move this file somewhere, and start with a clean
  15. # file but keep this around for reference. Or just disable in sites-enabled.
  16. #
  17. # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
  18. ##
  19.  
  20. server {
  21. #listen 80; ## listen for ipv4; this line is default and implied
  22. #listen [::]:80 default_server ipv6only=on; ## listen for ipv6
  23.  
  24. root /usr/share/nginx/www;
  25. index index.html index.htm;
  26.  
  27. # Make site accessible from http://localhost/
  28. server_name localhost;
  29.  
  30. location / {
  31. # First attempt to serve request as file, then
  32. # as directory, then fall back to displaying a 404.
  33.  
  34. #try_files $uri $uri/ /index.html;
  35.  
  36. # BEGIN Hide My WP
  37.  
  38. rewrite ^/other/js/embed\.min\.js /wp-includes/js/wp-embed.min.js?nSIQF_hide_my_wp=1234 last;
  39. rewrite ^/other/(.*) /wp-includes/$1?nSIQF_hide_my_wp=1234 last;
  40. rewrite ^/file/(.*) /wp-content/uploads/$1?nSIQF_hide_my_wp=1234 last;
  41. rewrite ^/ext/(.*) /wp-content/plugins/$1?nSIQF_hide_my_wp=1234 last;
  42. rewrite ^/skin/main\.css /?style_wrapper=1&nSIQF_hide_my_wp=1234 last;
  43. rewrite ^/skin/style\.css /nothing_404_404?nSIQF_hide_my_wp=1234 last;
  44. rewrite ^/skin/(.*) /wp-content/themes/github.theme/theme/$1?nSIQF_hide_my_wp=1234 last;
  45. rewrite ^/ajax /wp-admin/admin-ajax.php?nSIQF_hide_my_wp=1234 last;
  46. rewrite ^/inc/(.*) /wp-content/$1?nSIQF_hide_my_wp=1234 last;
  47. rewrite ^/(readme\.html|license\.txt|wp-content/debug\.log|wp-includes/$) /nothing_404_404?nSIQF_hide_my_wp=1234 last;
  48. rewrite ^/(((wp-content|wp-includes)/([A-Za-z0-9\-\_\/]*))|(wp-admin/(!network\/?)([A-Za-z0-9\-\_\/]+)))(\.txt|/)$ /nothing_404_404?nSIQF_hide_my_wp=1234 last;
  49.  
  50. # END Hide My WP
  51.  
  52. try_files $uri $uri/ /index.php?q=$uri&$args;
  53.  
  54.  
  55. # Uncomment to enable naxsi on this location
  56. # include /etc/nginx/naxsi.rules
  57. }
  58.  
  59. location /doc/ {
  60. alias /usr/share/doc/;
  61. autoindex on;
  62. allow 127.0.0.1;
  63. allow ::1;
  64. deny all;
  65. }
  66.  
  67. # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests
  68. #location /RequestDenied {
  69. # proxy_pass http://127.0.0.1:8080;
  70. #}
  71.  
  72. #error_page 404 /404.html;
  73.  
  74. # redirect server error pages to the static page /50x.html
  75. #
  76. #error_page 500 502 503 504 /50x.html;
  77. #location = /50x.html {
  78. # root /usr/share/nginx/www;
  79. #}
  80.  
  81. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  82. #
  83. #location ~ \.php$ {
  84. # fastcgi_split_path_info ^(.+\.php)(/.+)$;
  85. # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
  86. #
  87. # # With php5-cgi alone:
  88. # fastcgi_pass 127.0.0.1:9000;
  89. # # With php5-fpm:
  90. # fastcgi_pass unix:/var/run/php5-fpm.sock;
  91. # fastcgi_index index.php;
  92. # include fastcgi_params;
  93. #}
  94.  
  95. # deny access to .htaccess files, if Apache's document root
  96. # concurs with nginx's one
  97. #
  98. #location ~ /\.ht {
  99. # deny all;
  100. #}
  101. }
  102.  
  103.  
  104. # another virtual host using mix of IP-, name-, and port-based configuration
  105. #
  106. #server {
  107. # listen 8000;
  108. # listen somename:8080;
  109. # server_name somename alias another.alias;
  110. # root html;
  111. # index index.html index.htm;
  112. #
  113. # location / {
  114. # try_files $uri $uri/ =404;
  115. # }
  116. #}
  117.  
  118.  
  119. # HTTPS server
  120. #
  121. #server {
  122. # listen 443;
  123. # server_name localhost;
  124. #
  125. # root html;
  126. # index index.html index.htm;
  127. #
  128. # ssl on;
  129. # ssl_certificate cert.pem;
  130. # ssl_certificate_key cert.key;
  131. #
  132. # ssl_session_timeout 5m;
  133. #
  134. # ssl_protocols SSLv3 TLSv1;
  135. # ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
  136. # ssl_prefer_server_ciphers on;
  137. #
  138. # location / {
  139. # try_files $uri $uri/ =404;
  140. # }
  141. #}
Add Comment
Please, Sign In to add comment