nginx入门配置

user  www www;
worker_processes 4; error_log logs/error.log; #pid logs/nginx.pid; events {
worker_connections 56636;
} 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 65; #gzip on; upstream test_d{
server 10.86.48.22:65531;
}
upstream abcd_d{
server 10.86.48.22:8091;
} server {
listen 8089;
server_name test.adu.com; location / {
proxy_pass http://test_d;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
server {
listen 8089;
server_name abcd.adu.com; location / {
proxy_pass http://abcd_d;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
} }
上一篇:Mysql中You can't specify target table for update in FROM clause错误的意思是说,不能先select出同一表中的某些值,再update这个表(在同一语句中)。


下一篇:hdu 5430 Reflect (数学推导题)