From cdc48468a8f0d2803f0c7d2c3a5173a5a718e6e8 Mon Sep 17 00:00:00 2001 From: welefen Date: Wed, 30 Oct 2013 17:47:19 +0800 Subject: [PATCH] by welefen --- App/Lib/Action/Home/IndexAction.class.js | 1 - nginx.conf | 33 ++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 nginx.conf diff --git a/App/Lib/Action/Home/IndexAction.class.js b/App/Lib/Action/Home/IndexAction.class.js index 93878036..3463723b 100644 --- a/App/Lib/Action/Home/IndexAction.class.js +++ b/App/Lib/Action/Home/IndexAction.class.js @@ -5,7 +5,6 @@ module.exports = Action(function(){ }, indexAction: function(){ var cookie = this.cookie("name"); - //this.redirect("http://www.baidu.com"); this.assign({ name: "welefen" }) diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 00000000..2e0c8432 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,33 @@ +log_format thinkjs.ueapp.com '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" $http_x_forwarded_for'; +server + { + listen 80; + server_name thinkjs.ueapp.com; + index index.js index.html index.htm; + root /home/welefen/www/thinkjs.ueapp.com/; + + location / { + 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:8360/; + proxy_redirect off; + } + + location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|ico)$ + { + expires 1000d; + } + + location ~ .*\.(js|css)$ + { + expires 1000d; + } + + + access_log /home/welefen/logs/thinkjs.ueapp.com.log thinkjs.ueapp.com; + } \ No newline at end of file