Advertisement
Guest User

Untitled

a guest
May 26th, 2015
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.22 KB | None | 0 0
  1. [root@s1 conf.d]# cat bat.conf
  2. server {
  3. listen 127.0.0.1:81;
  4. server_name bathroomremodelaustintx.com www.bathroomremodelaustintx.com;
  5. port_in_redirect off;
  6. server_tokens off;
  7. autoindex off;
  8.  
  9. client_max_body_size 15m;
  10. client_body_buffer_size 128k;
  11.  
  12. root /home/bat/public_html;
  13. index index.html index.htm index.php;
  14. try_files $uri $uri/ /index.php?q=$uri&$args;
  15.  
  16. # Define default caching of 24h
  17. expires 86400s;
  18. add_header Pragma public;
  19. add_header Cache-Control "max-age=86400, public, must-revalidate, proxy-revalidate";
  20.  
  21. # deliver a static 404
  22. error_page 404 /404.html;
  23. location /404.html {
  24. internal;
  25. }
  26.  
  27. # Deliver 404 instead of 403 "Forbidden"
  28. error_page 403 = 404;
  29.  
  30. # Do not allow access to files giving away your WordPress version
  31. location ~ /(\.|wp-config.php|readme.html|licence.txt) {
  32. return 404;
  33. }
  34.  
  35. # Add trailing slash to */wp-admin requests.
  36. rewrite /wp-admin$ $scheme://$host$uri/ permanent;
  37.  
  38. # Don't log robots.txt requests
  39. location = /robots.txt {
  40. allow all;
  41. log_not_found off;
  42. access_log off;
  43. }
  44.  
  45. # Rewrite for versioned CSS+JS via filemtime
  46. location ~* ^.+\.(css|js)$ {
  47. rewrite ^(.+)\.(\d+)\.(css|js)$ $1.$3 last;
  48. expires 31536000s;
  49. access_log off;
  50. log_not_found off;
  51. add_header Pragma public;
  52. add_header Cache-Control "max-age=31536000, public";
  53. }
  54.  
  55. # Aggressive caching for static files
  56. # If you alter static files often, please use
  57. # add_header Cache-Control "max-age=31536000, public, must-revalidate, proxy-revalidate";
  58. location ~* \.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|ogv|otf|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|t?gz|tif|tiff|ttf|wav|webm|wma|woff|wri|xla|xls|xlsx|xlt|xlw|zip)$ {
  59. expires 31536000s;
  60. access_log off;
  61. log_not_found off;
  62. add_header Pragma public;
  63. add_header Cache-Control "max-age=31536000, public";
  64. }
  65.  
  66. # pass PHP scripts to Fastcgi listening on Unix socket
  67. # Do not process them if inside WP uploads directory
  68. # If using Multisite or a custom uploads directory,
  69. # please set the */uploads/* directory in the regex below
  70. location ~* (^(?!(?:(?!(php|inc)).)*/uploads/).*?(php)) {
  71. try_files $uri = 404;
  72. fastcgi_split_path_info ^(.+.php)(.*)$;
  73. fastcgi_pass unix:/var/run/php-fpm/bat.sock;
  74. fastcgi_index index.php;
  75. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  76. include fastcgi_params;
  77. fastcgi_intercept_errors on;
  78. fastcgi_ignore_client_abort off;
  79. fastcgi_connect_timeout 60;
  80. fastcgi_send_timeout 180;
  81. fastcgi_read_timeout 180;
  82. fastcgi_buffer_size 128k;
  83. fastcgi_buffers 4 256k;
  84. fastcgi_busy_buffers_size 256k;
  85. fastcgi_temp_file_write_size 256k;
  86. }
  87.  
  88. # Deny access to hidden files
  89. location ~ /\. {
  90. deny all;
  91. access_log off;
  92. log_not_found off;
  93. }
  94. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement