user root;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
client_max_body_size 20m;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
#域名
upstream wechattest.ahies.com{
server localhost:8181;
}
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
# api映射
location /hncijaapi/ {
proxy_pass http://wechattest.ahies.com/;
proxy_set_header X-real-ip $remote_addr;
}
location /ijaapi/ {
proxy_pass http://wechattest.ahies.com/;
proxy_set_header X-real-ip $remote_addr;
}
#图片等上传文件映射 访问路径 http://wechattest.ahies.com/hncimg/ 实际 /hncija/uploads/hncimg
location /hncimg/ {
root /hncija/uploads/;
}
# http://wechattest.ahies.com/img/ 实际/ija/uploads/img
location /img/ {
root /ija/uploads/;
}
# http://wechattest.ahies.com/page/ 实际/hncija/wechat/page
location /{
root /hncija/wechat ;
index index.html index.htm;
autoindex off;
}
#后台 http://wechattest.ahies.com/ija/#/ 实际 /hncija/ija
location /ija{
root /hncija ;
index index.html index.htm;
autoindex off;
}
location /12368{
root /hncija ;
index index.html index.htm;
autoindex off;
}
location /judge{
root /hncija ;
index index.html index.htm;
autoindex off;
}
location /screen{
root /hncija ;
index index.html index.htm;
autoindex off;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}