Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@s1 conf.d]# cat bat.conf
- server {
- listen 127.0.0.1:81;
- server_name bathroomremodelaustintx.com www.bathroomremodelaustintx.com;
- port_in_redirect off;
- server_tokens off;
- autoindex off;
- client_max_body_size 15m;
- client_body_buffer_size 128k;
- root /home/bat/public_html;
- index index.html index.htm index.php;
- try_files $uri $uri/ /index.php?q=$uri&$args;
- # Define default caching of 24h
- expires 86400s;
- add_header Pragma public;
- add_header Cache-Control "max-age=86400, public, must-revalidate, proxy-revalidate";
- # deliver a static 404
- error_page 404 /404.html;
- location /404.html {
- internal;
- }
- # Deliver 404 instead of 403 "Forbidden"
- error_page 403 = 404;
- # Do not allow access to files giving away your WordPress version
- location ~ /(\.|wp-config.php|readme.html|licence.txt) {
- return 404;
- }
- # Add trailing slash to */wp-admin requests.
- rewrite /wp-admin$ $scheme://$host$uri/ permanent;
- # Don't log robots.txt requests
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- # Rewrite for versioned CSS+JS via filemtime
- location ~* ^.+\.(css|js)$ {
- rewrite ^(.+)\.(\d+)\.(css|js)$ $1.$3 last;
- expires 31536000s;
- access_log off;
- log_not_found off;
- add_header Pragma public;
- add_header Cache-Control "max-age=31536000, public";
- }
- # Aggressive caching for static files
- # If you alter static files often, please use
- # add_header Cache-Control "max-age=31536000, public, must-revalidate, proxy-revalidate";
- 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)$ {
- expires 31536000s;
- access_log off;
- log_not_found off;
- add_header Pragma public;
- add_header Cache-Control "max-age=31536000, public";
- }
- # pass PHP scripts to Fastcgi listening on Unix socket
- # Do not process them if inside WP uploads directory
- # If using Multisite or a custom uploads directory,
- # please set the */uploads/* directory in the regex below
- location ~* (^(?!(?:(?!(php|inc)).)*/uploads/).*?(php)) {
- try_files $uri = 404;
- fastcgi_split_path_info ^(.+.php)(.*)$;
- fastcgi_pass unix:/var/run/php-fpm/bat.sock;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- fastcgi_intercept_errors on;
- fastcgi_ignore_client_abort off;
- fastcgi_connect_timeout 60;
- fastcgi_send_timeout 180;
- fastcgi_read_timeout 180;
- fastcgi_buffer_size 128k;
- fastcgi_buffers 4 256k;
- fastcgi_busy_buffers_size 256k;
- fastcgi_temp_file_write_size 256k;
- }
- # Deny access to hidden files
- location ~ /\. {
- deny all;
- access_log off;
- log_not_found off;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement