NGINX网站poxy_pass不适用于非www

时间:2015-11-13 16:15:06

标签: nginx

我在nginx上运行了一个nodejs应用程序(在端口:8989上)并被路由到端口80。

server {
    listen 80;
    server_name example.com www.example.com;
    access_log /var/log/nginx/example.access.log;
    location / {
        proxy_pass    http://127.0.0.1:8989/;
    }
}

万维网。 addressess将加载网站。

我目前的dns记录如下:

A Record     @       108.xxx.xxx.xxx
A Record     www     108.xxx.xxx.xxx

此服务器正在运行一个非常旧版本的nginx。 (V0.7)

0 个答案:

没有答案