Skip to content

How to use custom configuration #567

@adicrescenzo

Description

@adicrescenzo

I need to use some custom ngnix configuration. In order to do that I've created the file /data/nginx/custom/server_proxy.conf with this settings:

server {
   
    listen 80;
    listen [::]:80;
    listen 443 ssl http2;
    listen [::]:443;

    # Let's Encrypt SSL
    include conf.d/include/letsencrypt-acme-challenge.conf;
    include conf.d/include/ssl-ciphers.conf;
    ssl_certificate /etc/letsencrypt/live/npm-1/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/npm-1/privkey.pem;
    server_name "~^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$";

    location / {
        proxy_pass "<IP_ADDRESS>:<PORT>"
    }
}

How can I force ngnix to reload the settings and read this new file? I opened a shell on the ngnix-proxy-mangaer container and I launched the command

nginx -s reload

but I got this error:

nginx: [emerg] "http" directive is not allowed here in /data/nginx/custom/server_proxy.conf:1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions