0

I have the following config which is working

my nginx.conf

worker_processes 4;
pid /run/nginx.pid;

events {}

http {
    server {
        listen 443 ssl;
        server_name host.com;
        access_log /var/log/nginx/host.access.log;
        proxy_set_header X-Forwarded-Host $host;
        ssl_certificate /etc/ssl/host.com.crt;
        ssl_certificate_key /etc/ssl/host.com.key;
        location / {
            proxy_pass http://other-host.com/;
        }
    }
}

and I am trying do do something like that

My nginx.conf

worker_processes 4;
pid /run/nginx.pid;

events {}

http {
    include front/*
}

My front/host.com.conf

server {
        listen 443 ssl;
        server_name host.com;
        access_log /var/log/nginx/host.access.log;
        proxy_set_header X-Forwarded-Host $host;
        ssl_certificate /etc/ssl/host.com.crt;
        ssl_certificate_key /etc/ssl/host.com.key;
        location / {
            proxy_pass http://other-host.com/;
        }
    }

In this case I have an error 525, I don't understand why, the configuration should be exactly the same

1
  • Please expand on the exact error as error 525 doesn't really mean much on its own. The only common 525 error I'm aware of is a Cloudflare one, but you do not mention Cloudflare in your post. Providing precise information is more likely to get a better response.
    – Unbeliever
    Oct 2 '16 at 11:17
0

Maybe that is just copy-paste error, but your config should not work because of forgotten ';' after include.

worker_processes 4;
pid /run/nginx.pid;

events {}

http {
    include front/*;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.