Advertisement
Guest User

Untitled

a guest
Feb 2nd, 2012
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.96 KB | None | 0 0
  1. #######################################
  2. # Some essential stuff
  3. #######################################
  4. user apache;
  5. worker_processes 6;
  6. error_log logs/error.log;
  7. #error_log logs/error.log notice;
  8. #error_log logs/error.log info;
  9. pid logs/nginx.pid;
  10. events
  11. {
  12. worker_connections 10000;
  13. use epoll;
  14. }
  15. #################################################
  16. # Start of the webserver handling
  17. #################################################
  18. http
  19. {
  20. include mime.types;
  21. default_type application/octet-stream;
  22. #####################################################
  23. # Access logging disabled, is it needed?
  24. #####################################################
  25. access_log off;
  26. #####################################################
  27. # Some more standard stuff
  28. #####################################################
  29. sendfile on;
  30. tcp_nopush on;
  31. tcp_nodelay on;
  32. keepalive_timeout 180;
  33. server_name_in_redirect off;
  34. server_tokens off;
  35. ##################################
  36. # The Gzip compression
  37. ##################################
  38. gzip on;
  39. gzip_disable "MSIE [1-6].(?!.*SV1)";
  40. gzip_vary on;
  41. gzip_proxied any;
  42. gzip_comp_level 3;
  43. gzip_buffers 32 8k;
  44. gzip_http_version 1.1;
  45. gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
  46. ##############################################
  47. # Some more shit
  48. ##############################################
  49. client_body_buffer_size 256k;
  50. client_body_in_file_only on;
  51. client_body_timeout 60s;
  52. client_header_buffer_size 256k;
  53. client_header_timeout 20s;
  54. client_max_body_size 128m;
  55. connection_pool_size 256;
  56. directio 4m;
  57. ignore_invalid_headers on;
  58. large_client_header_buffers 4 256k;
  59. output_buffers 4 256k;
  60. postpone_output 1460;
  61. request_pool_size 32k;
  62. send_timeout 60s;
  63. reset_timedout_connection on;
  64. open_file_cache max=5000 inactive=30s;
  65. open_file_cache_valid 120s;
  66. open_file_cache_min_uses 2;
  67. open_file_cache_errors off;
  68. open_log_file_cache max=1024 inactive=30s min_uses=2;
  69. server
  70. {
  71. listen 80;
  72. server_name fivestargamerz.com;
  73. rewrite ^/(.*) http://www.fivestargamerz.com/$1 permanent;
  74. }
  75. ######################################################
  76. # http://www.fivestargamerz.com - Main handler
  77. ######################################################
  78. server
  79. {
  80. listen 80;
  81. server_name www.fivestargamerz.com;
  82. #access_log logs/host.access.log main;
  83. root /home/fivestar/domains/fivestargamerz.com/public_html;
  84. index index.php index.html index.htm;
  85. error_page 500 502 503 504 /503.html;
  86. #####################################################################
  87. # Main access point
  88. #####################################################################
  89. location /
  90. {
  91. rewrite ^/((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ /vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 last;
  92. try_files $uri $uri/ @vbseo;
  93. }
  94. location ~* \.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|txt|js|css|exe|zip|tar|rar|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso)$
  95. {
  96. add_header Pragma public;
  97. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  98. access_log off;
  99. expires 30d;
  100. break;
  101. }
  102. ##########################################################
  103. # Secure Sysinfo Folder
  104. ##########################################################
  105. location ~ /sysinfo/index.php
  106. {
  107. auth_basic "System Info";
  108. auth_basic_user_file /home/fivestar/domains/fivestargamerz.com/public_html/sysinfo/.htpasswd;
  109. fastcgi_pass unix:/opt/shared/php-fpm.sock;
  110. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  111. include fastcgi_params;
  112. }
  113. ##########################################################
  114. # Secure Xcache Folder
  115. ##########################################################
  116. location ~ /xcacheadmin/index.php
  117. {
  118. auth_basic "Xcache Control";
  119. auth_basic_user_file /home/fivestar/domains/fivestargamerz.com/public_html/sysinfo/.htpasswd;
  120. fastcgi_pass unix:/opt/shared/php-fpm.sock;
  121. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  122. include fastcgi_params;
  123. }
  124. ##########################################################
  125. # Secure Memcached Folder
  126. ##########################################################
  127. location ~ /memcached/index.php
  128. {
  129. auth_basic "MemCache Control";
  130. auth_basic_user_file /home/fivestar/domains/fivestargamerz.com/public_html/sysinfo/.htpasswd;
  131. fastcgi_pass unix:/opt/shared/php-fpm.sock;
  132. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  133. include fastcgi_params;
  134. }
  135. location @vbseo
  136. {
  137. try_files $uri $uri/ /vbseo.php?$args;
  138. fastcgi_pass unix:/opt/shared/php-fpm.sock;
  139. fastcgi_param SCRIPT_FILENAME $document_root/vbseo.php;
  140. fastcgi_param QUERY_STRING vbseourl=$request_uri;
  141. include fastcgi_params;
  142. internal;
  143. }
  144. location = /inlinemod.php
  145. {
  146. fastcgi_pass unix:/opt/shared/php-fpm.sock;
  147. fastcgi_param SCRIPT_FILENAME $document_root/vbseo.php;
  148. fastcgi_param QUERY_STRING vbseourl=$request_uri;
  149. include fastcgi_params;
  150. }
  151. ##########################################################################
  152. # PHP files handled here
  153. ##########################################################################
  154. location ~ \.php$
  155. {
  156. try_files $uri =404;
  157. fastcgi_pass unix:/opt/shared/php-fpm.sock;
  158. fastcgi_index index.php;
  159. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  160. include fastcgi_params;
  161. }
  162. location /pinger
  163. {
  164. access_log off;
  165. fastcgi_pass unix:/opt/shared/php-fpm.sock;
  166. fastcgi_index index.php;
  167. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  168. include fastcgi_params;
  169. }
  170. ##########################################
  171. # Deny .htaccess files
  172. ##########################################
  173. location ~ /\.ht
  174. {
  175. deny all;
  176. }
  177. }
  178. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement