Skip to content

Instantly share code, notes, and snippets.

@quangbahoa
Created December 21, 2016 09:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quangbahoa/805e49ec9623758d1612102e755cb425 to your computer and use it in GitHub Desktop.
Save quangbahoa/805e49ec9623758d1612102e755cb425 to your computer and use it in GitHub Desktop.
server {
server_name www.cantwo.net;
rewrite ^(.*) http://cantwo.net$1 permanent;
}
server {
listen 80;
access_log off;
# access_log /home/cantwo.net/logs/access_log;
error_log off;
# error_log /home/cantwo.net/logs/error.log;
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
root /home/cantwo.net/public_html;
include /etc/nginx/conf/ddos2.conf;
index index.php index.html index.htm;
server_name cantwo.net;
include /etc/nginx/conf/cantwo_net.conf;
# Confif Cache Static Files
include /etc/nginx/conf/staticfiles.conf;
#Config to Protect-Wp-login.php
include /etc/nginx/pwprotect/cantwo.net/wp_login.conf;
# Error Page
#error_page 403 /errorpage_html/403.html;
#error_page 404 /errorpage_html/404.html;
#error_page 405 /errorpage_html/405.html;
#error_page 502 /errorpage_html/502.html;
#error_page 503 /errorpage_html/503.html;
#error_page 504 /errorpage_html/504.html;
#location ^~ /errorpage_html/ {
# internal;
# root /home/cantwo.net;
# access_log off;
#}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_connect_timeout 250;
fastcgi_send_timeout 250;
fastcgi_read_timeout 250;
fastcgi_buffer_size 256k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
fastcgi_param SCRIPT_FILENAME /home/cantwo.net/public_html$fastcgi_script_name;
}
#include /etc/nginx/conf/phpstatus.conf;
include /etc/nginx/conf/drop.conf;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment