nginx做yum源
#cat/local/nginx/conf/nginx.conf usernginx nginx;worker_processes1;
pid /local/nginx/run/nginx/nginx.pid;
events {
worker_connections1024;
}
http {
include mime.types;
default_typeapplication/octet-stream;
log_formatmain'$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"'
'$upstream_addr $upstream_response_time $request_time ';
log_format log404 '$status [$time_local] $remote_addr $host$request_uri $sent_http_location';
access_loglogs/nginx/access.log main;
access_loglogs/nginx/host.access.404.loglog404;
sendfile on;
keepalive_timeout65;
server {
listen 80;
server_name localhost;
large_client_header_buffers 4 128k;
client_max_body_size 300m;
client_body_buffer_size 128k;
proxy_connect_timeout 600;
proxy_read_timeout 600;
proxy_send_timeout 600;
proxy_buffer_size 64k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
location /status{
stub_status on;
access_log on;
auth_basic "status";
auth_basic_user_file htpasswd;
}
location /nk {
indexindex.html index.htm index.jsp;
proxy_pass http://10.7.12.15:8081/nk;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host:$server_port;
}
error_page 500 502 503 504/50x.html;
location = /50x.html {
root html;
}
include /local/nginx/conf.d/*.conf; #加载其它配置文件
}
页:
[1]