Organizr / Config-Collections-for-Nginx

A Collection of Functioning Nginx Configurations
GNU General Public License v3.0
155 stars 25 forks source link

access outside network #19

Closed arissaraiva closed 4 years ago

arissaraiva commented 4 years ago

Sorry a bit newbie for nginx, I could install organizr on windows e set up to work inside my netwrok, but would like to use outside my network as I use already my apps. I have ports forwarded already, and I have a domain, I followed some instructions but nothing worked, I tried to create a subdomain, but when I try to reload nginx it gives me that error

[emerg] CreateFile() "c:/var/log/nginx/sonarr.access.log" failed (3: FormatMessage() error:(1813))

I used these example on my subdomain.conf changing to my domain on the organizr docs

server {
        listen 443 ssl;
        server_name sonarr.DOMAIN.TLD;

        ssl_certificate /etc/letsencrypt/live/DOMAIN.TLD/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/DOMAIN.TLD/privkey.pem;

        ssl_session_cache builtin:1000 shared:SSL:10m;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers on;

        access_log /var/log/nginx/sonarr.access.log;

        location / {
                proxy_pass http://127.0.0.1:8989;
                proxy_set_header X-Forwarded-Host $server_name;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-Proto $scheme;
        }
}

haven´t had any lucky. If there´s nyone that could help me.

Roxedus commented 4 years ago

You need to update the access_log directive to a windows path. The directory also has to exist. access_log /var/log/nginx/sonarr.access.log;