http {
include mime.types;
default_type application/octet-stream;
client_max_body_size 20m;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /usr/local/nginx/logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
# HTTPS server
server {
listen 443 ssl;
listen 80;
listen 8083;
server_name test.tttt.com ;
autoindex on;
ssl_certificate /usr/local/nginx/cert/xxxx.pem;
ssl_certificate_key /usr/local/nginx/cert/xxxx.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
access_log off;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
fastcgi_connect_timeout 600;
fastcgi_read_timeout 600;
fastcgi_send_timeout 600;
client_max_body_size 20m;
client_body_buffer_size 20m;
gzip_static on;
gzip_proxied no-cache no-store private expired auth;
location / {
root /opt/project/test;
index index.html index.htm;
autoindex off;
proxy_buffer_size 20m;
proxy_buffering on;
proxy_buffers 4 20m;
proxy_busy_buffers_size 20m;
proxy_max_temp_file_size 1024m;
}
location /yw/ {
root html;
client_max_body_size 20M;
client_body_buffer_size 20M;
proxy_read_timeout 600;
proxy_connect_timeout 600;
proxy_send_timeout 600;
index index.html index.htm;
proxy_pass http://127.0.0.1:8080/yw/;
}
}
nginx配置参考
最新推荐文章于 2024-06-13 08:44:35 发布