我在网上看了一天了,都是修改client_header_buffer_size 16k;与large_client_header_buffers 4 46k;但是我已经调大了但是还是没用!Linux的ssh的端口号被安全拦截了我重新写了一个端口号重启了一下服务器后就报这个错!请问一下大神怎么解决啊?
client_header_buffer_size 16k
我设置了这个后出现404了
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" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
client_header_buffer_size 16K;
large_client_header_buffers 4 64K;
client_body_buffer_size 512k;
client_max_body_size 10m;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 300;
proxy_read_timeout 300;
proxy_send_timeout 300;
proxy_buffer_size 32k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
proxy_headers_hash_max_size 51200;
proxy_headers_hash_bucket_size 6400;
gzip on;
server {
listen 80;
server_name localhost test.jsh178.com;
# index index.html index.htm;
# rewrite ^(.*) https://$host$1 permanent;
access_log off;
location / {
proxy_next_upstream http_502 http_504 error timeout invalid_header;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $Host;
proxy_pass http://127.0.0.1:8080;
error_page 404 = /404.html;
}
}
#
server {
listen 443;
server_name test.jsh178.com;
ssl on;
ssl_certificate 1_test.jsh178.com_bundle.crt;
ssl_certificate_key 2_test.jsh178.com.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
location / {
proxy_next_upstream http_502 http_504 error timeout invalid_header;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $Host;
proxy_pass http://127.0.0.1:8080;
error_page 404 = /404.html;
}
}
这个是我的Nginx的配置
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。