mirror of
https://github.com/thinkjs/thinkjs.git
synced 2026-01-25 14:42:47 +00:00
27 lines
831 B
Nginx Configuration File
27 lines
831 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name meinv.ueapp.com;
|
|
index index.js index.html index.htm;
|
|
root /Users/welefen/Develop/git/meinv.ueapp.com/www;
|
|
|
|
if (-f $request_filename/index.html){
|
|
rewrite (.*) $1/index.html break;
|
|
}
|
|
if (!-f $request_filename){
|
|
rewrite (.*) /index.js;
|
|
}
|
|
location = /index.js {
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "";
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-NginX-Proxy true;
|
|
proxy_pass http://127.0.0.1:6666$request_uri;
|
|
proxy_redirect off;
|
|
}
|
|
location ~ .*\.(js|css|gif|jpg|jpeg|png|bmp|swf|ico|svg|cur|ttf|woff)$ {
|
|
expires 1000d;
|
|
}
|
|
}
|