nginx + resin搭建
默认8080,可修改
?
4:启动resin
works/resin-3.0.23/bin/http.sh start
浏览器中输入host:端口,能打开resin欢迎界面说明resin配置成功

?
?
5:整合nginx, resin
使用nginx的proxy功能,将请求转发给resin
修改nginx的配置文件nginx.conf
?
?程序代码
server {
? ? ? ? listen ? ? ? 80;
? ? ? ? server_name ?www.qinghuis.com;
?
? ? ? ? error_page ? 500 502 503 504 ?/50x.html;
? ? ? ? location = /50x.html {
? ? ? ? ? ? root ? html;
? ? ? ? }
?
?
? ? ? ? location / {
? ? ? ? ? ? ?access_log on;
? ? ? ? ? ? ?proxy_pass http://127.0.0.1:8082;
? ? ? ? ? ? ?proxy_set_header X-Real-IP $remote_addr; ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
? ? ? ? ? ? ?proxy_set_header Host $host; ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
? ? ? ? ? ? ?proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?client_max_body_size ? ?10m; ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
? ? ? ? ? ? ?client_body_buffer_size 128k; ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
? ? ? ? } ? ? ??
} ? ? ? ?
?
修改配置后重启nginx,访问nginx则会跳转至resin欢迎页
?
?
?