我在站点启用/默认中有此配置
upstream domainone.com.ar {
server 127.0.0.1:9000;
}
server {
listen 80;
server_name www.domainone.com.ar;
rewrite ^/(.*) http://domainone.com.ar/$1 permanent;
}
server {
listen 80;
listen [::]:80 ipv6only=on;
server_name domainone.com.ar;
#access_log /var/log/nginx/example1.com/access.log;
location / {
if ($request_uri ~* \.(ico|css|js|gif|jpe?g|png)$) {
expires 168h;
break;
}
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://domainone.com.ar;
proxy_redirect off;
}
}
upstream domaintwo.com.ar {
server 127.0.0.1:8000;
}
server {
listen 80;
server_name domaintwo.com.ar;
rewrite ^/(.*) http://domaintwo.com.ar/$1 permanent;
}
server {
listen 80;
listen [::]:80 ipv6only=on;
server_name www.domaintwo.com.ar;
#access_log /var/log/nginx/example1.com/access.log;
location / {
if ($request_uri ~* \.(ico|css|js|gif|jpe?g|png)$) {
expires 168h;
break;
}
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://domaintwo.com.ar;
proxy_redirect off;
}
}
当我尝试 /etc/init.d/nginx 启动时...什么也没有发生...没有错误没有日志没有什么...我的服务器是云服务器 debian 6、64bits nodejs v0.10 nginx 1.2.6 有配置有问题??