标签:lis include file ring def http logs default param
server { listen 80; server_name www.heboan.com heboan.com; access_log /data/logs/nginx/www_heboan_com.asscess.log main; location / { proxy_pass http://127.0.0.1:8080; proxy_redirect default; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_connect_timeout 30; proxy_send_timeout 60; proxy_read_timeout 60; proxy_buffer_size 32k; proxy_buffering on; proxy_buffers 4 128k; proxy_busy_buffers_size 256k; proxy_max_temp_file_size 256k; } }
# vim proxy_params proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_connect_timeout 30; proxy_send_timeout 60; proxy_read_timeout 60; proxy_buffer_size 32k; proxy_buffering on; proxy_buffers 4 128k; proxy_busy_buffers_size 256k; proxy_max_temp_file_size 256k; 然后我们在nginx配置文件中只要需要包含proxy_params就可以 server { listen 80; server_name www.heboan.com heboan.com; access_log /data/logs/nginx/www_heboan_com.asscess.log main; location / { proxy_pass http://127.0.0.1:8080; proxy_redirect default; include proxy_params; } }
标签:lis include file ring def http logs default param
原文地址:http://www.cnblogs.com/sellsa/p/7787788.html