Nginx nginx 同时代理 passenger 和 apache

firsthym · June 16, 2013 · Last by itsvoid replied at June 21, 2013 · 3635 hits

服务器环境: nginx 用作反向代理,之前代理的是 passenger,跑的 rails 应用 (http://cookgoogle.com),一切正常

后来我想把我的 wordpress 搬到自己的 VPS 上,所以安装了 apache,nginx 配置如下:

upstream apache {
106       server 127.0.0.1:8000 weight=5;
107     }
108     server {
109       listen 80;
110       server_name geekway.me;
111       location / {
112         proxy_pass http://apache;
113         proxy_redirect off;
114         proxy_redirect          off;
115         proxy_set_header        Host $host;
116         proxy_set_header        X-Real-IP $remote_addr;
117         proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
118         client_max_body_size    10m;
119         client_body_buffer_size 128k;
120         proxy_connect_timeout   300;
121         proxy_send_timeout      300;
122         proxy_read_timeout      300;
123         proxy_buffer_size       4k;
124         proxy_buffers           4 32k;
125         proxy_busy_buffers_size 64k;
126         proxy_temp_file_write_size 64k;
127 
128       }
129     }

之后用浏览器访问http://geekway.me 发现没有应用样式,样式的地址是我的 upstream 的名字:

<link rel="stylesheet" id="twentytwelve-style-css" href="http://apache/wp-content/themes/twentytwelve/style.css?ver=3.5.1" type="text/css" media="all">

请问还需要设置什么地方吗?

You need to Sign in before reply, if you don't have an account, please Sign up first.