尝试配置NGNIX配置文件,但收到未知错误

时间:2020-09-02 15:50:20

标签: nginx

这是我的NGNIX配置文件,

server {
        listen 8081;
        listen [::]:8081;

        root /var/www/example.com/html;
        index index.html index.htm index.nginx-debian.html;

        server_name example.com www.example.com;

         location /open-positions/ {
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-Proto https;
                proxy_set_header X-Forwarded-For $remote_addr;
                proxy_set_header X-Forwarded-Host $remote_addr;

                proxy_pass http://local{{ domain_name }}:{{ jobs_port }}/open-positions/;
                proxy_pass http://localexample.com:3028/open-positions/;

        }
}

每当我运行命令sudo ngnix -t时,都会引发此错误

nginx: [emerg] directive "proxy_pass" is not terminated by ";" in /etc/nginx/sites-enabled/localexample.com:16
nginx: configuration file /etc/nginx/nginx.conf test failed

0 个答案:

没有答案
相关问题