mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-02 18:50:13 +00:00
RE-TEST Nginx MainStream/Development Version Test
This commit is contained in:
parent
19823128f5
commit
6844de5932
1 changed files with 56 additions and 100 deletions
|
@ -1,117 +1,73 @@
|
||||||
|
user www-data;
|
||||||
#user nobody;
|
worker_processes auto;
|
||||||
worker_processes 1;
|
pid /run/nginx.pid;
|
||||||
|
include /etc/nginx/modules-enabled/*.conf;
|
||||||
#error_log logs/error.log;
|
|
||||||
#error_log logs/error.log notice;
|
|
||||||
#error_log logs/error.log info;
|
|
||||||
|
|
||||||
#pid logs/nginx.pid;
|
|
||||||
|
|
||||||
|
|
||||||
events {
|
events {
|
||||||
worker_connections 1024;
|
worker_connections 1024;
|
||||||
|
multi_accept on;
|
||||||
|
use epoll;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
http {
|
http {
|
||||||
include mime.types;
|
|
||||||
default_type application/octet-stream;
|
|
||||||
|
|
||||||
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
##
|
||||||
# '$status $body_bytes_sent "$http_referer" '
|
# Basic Settings
|
||||||
# '"$http_user_agent" "$http_x_forwarded_for"';
|
##
|
||||||
|
|
||||||
#access_log logs/access.log main;
|
sendfile on;
|
||||||
|
tcp_nopush on;
|
||||||
|
tcp_nodelay on;
|
||||||
|
keepalive_timeout 90s;
|
||||||
|
keepalive_requests 1000;
|
||||||
|
server_tokens off;
|
||||||
|
client_body_buffer_size 32k;
|
||||||
|
client_header_buffer_size 1k;
|
||||||
|
client_max_body_size 50M;
|
||||||
|
types_hash_max_size 2048;
|
||||||
|
large_client_header_buffers 4 16k;
|
||||||
|
variables_hash_max_size 2048;
|
||||||
|
variables_hash_bucket_size 1024;
|
||||||
|
|
||||||
sendfile on;
|
# Our request limiter zone for wp-login attacks
|
||||||
#tcp_nopush on;
|
limit_req_zone $binary_remote_addr zone=wp-login:10m rate=1r/s;
|
||||||
|
|
||||||
|
|
||||||
#keepalive_timeout 0;
|
include /etc/nginx/mime.types;
|
||||||
keepalive_timeout 65;
|
default_type application/octet-stream;
|
||||||
|
|
||||||
#gzip on;
|
##
|
||||||
|
# Logging Settings
|
||||||
|
##
|
||||||
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||||
|
'$status $body_bytes_sent "$http_referer" '
|
||||||
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||||
|
|
||||||
server {
|
access_log /var/log/nginx/access.log main;
|
||||||
listen 80;
|
error_log /var/log/nginx/error.log warn;
|
||||||
server_name localhost;
|
|
||||||
|
|
||||||
#charset koi8-r;
|
##
|
||||||
|
# Gzip Settings
|
||||||
|
##
|
||||||
|
|
||||||
#access_log logs/host.access.log main;
|
gzip on;
|
||||||
|
gzip_disable "MSIE [1-6]\.";
|
||||||
|
gzip_vary on;
|
||||||
|
gzip_static on;
|
||||||
|
gzip_min_length 20;
|
||||||
|
gzip_proxied expired no-cache no-store private auth;
|
||||||
|
gzip_comp_level 7;
|
||||||
|
gzip_buffers 32 4k;
|
||||||
|
gzip_http_version 1.1;
|
||||||
|
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||||
|
|
||||||
location / {
|
##
|
||||||
root html;
|
# Virtual Host Configs
|
||||||
index index.html index.htm;
|
##
|
||||||
}
|
|
||||||
|
|
||||||
#error_page 404 /404.html;
|
include /etc/nginx/conf.d/*.conf;
|
||||||
|
include /etc/nginx/sites-enabled/*;
|
||||||
# redirect server error pages to the static page /50x.html
|
|
||||||
#
|
|
||||||
error_page 500 502 503 504 /50x.html;
|
|
||||||
location = /50x.html {
|
|
||||||
root html;
|
|
||||||
}
|
|
||||||
|
|
||||||
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
|
|
||||||
#
|
|
||||||
#location ~ \.php$ {
|
|
||||||
# proxy_pass http://127.0.0.1;
|
|
||||||
#}
|
|
||||||
|
|
||||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
|
||||||
#
|
|
||||||
#location ~ \.php$ {
|
|
||||||
# root html;
|
|
||||||
# fastcgi_pass 127.0.0.1:9000;
|
|
||||||
# fastcgi_index index.php;
|
|
||||||
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
|
|
||||||
# include fastcgi_params;
|
|
||||||
#}
|
|
||||||
|
|
||||||
# deny access to .htaccess files, if Apache's document root
|
|
||||||
# concurs with nginx's one
|
|
||||||
#
|
|
||||||
#location ~ /\.ht {
|
|
||||||
# deny all;
|
|
||||||
#}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# another virtual host using mix of IP-, name-, and port-based configuration
|
|
||||||
#
|
|
||||||
#server {
|
|
||||||
# listen 8000;
|
|
||||||
# listen somename:8080;
|
|
||||||
# server_name somename alias another.alias;
|
|
||||||
|
|
||||||
# location / {
|
|
||||||
# root html;
|
|
||||||
# index index.html index.htm;
|
|
||||||
# }
|
|
||||||
#}
|
|
||||||
|
|
||||||
|
|
||||||
# HTTPS server
|
|
||||||
#
|
|
||||||
#server {
|
|
||||||
# listen 443 ssl;
|
|
||||||
# server_name localhost;
|
|
||||||
|
|
||||||
# ssl_certificate cert.pem;
|
|
||||||
# ssl_certificate_key cert.key;
|
|
||||||
|
|
||||||
# ssl_session_cache shared:SSL:1m;
|
|
||||||
# ssl_session_timeout 5m;
|
|
||||||
|
|
||||||
# ssl_ciphers HIGH:!aNULL:!MD5;
|
|
||||||
# ssl_prefer_server_ciphers on;
|
|
||||||
|
|
||||||
# location / {
|
|
||||||
# root html;
|
|
||||||
# index index.html index.htm;
|
|
||||||
# }
|
|
||||||
#}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue