odoo服务器上的nginx conf不起作用

时间:2015-11-24 10:18:32

标签: nginx dns openerp

这就是nginx conf的样子('xxxx'部分都是正确且相同的):

server {

    listen 80;
        server_name xxxxx-xxxxx.de;
        return 301 $scheme://www.xxxx-xxxx.de$request_uri;
    }

    server {

    listen 80;
    server_name *.xxxxxx-xxxxxx.de;

    access_log /var/log/nginx/xxxxx.access.log;
    error_log /var/log/nginx/xxxxx.error.log;

    # increase proxy buffer to handle some Odoo web requests
    proxy_buffers              16 64k;
    proxy_buffer_size          128k;

    proxy_connect_timeout      120s;
    proxy_send_timeout         600s;
    proxy_read_timeout         600s;

    # Specifies the maximum accepted body size of a client request,
    # as indicated by the request header Content-Length.
    client_max_body_size       100m;

    # force timeouts if the backend dies
    proxy_next_upstream        error timeout invalid_header http_500 http_502 http_503;

    # by default, do not forward anything
    proxy_redirect             off;

    location / {
        include /etc/nginx/proxy_params;
        proxy_pass http://127.0.0.1:8069;
    }
}

当我打开网站时,我得到connection refused

Nginx错误日志说:conflicting server name "xxxxx-xxxxx.de" on 0.0.0.0:80

我也评论了# include /etc/nginx/conf.d/*.conf;

我删除了已启用网站的默认配置。

1 个答案:

答案 0 :(得分:0)

我所做的只是:"服务nginx开始"

我总是只输入" nginx -t" +"服务nginx重新加载"我改变配置后