I have nginx set up in a docker container (https://hub.docker.com/r/aptalca/nginx-letsencrypt/). Some changes were made (adding the last location block) and now nginx fails to start. Using the nginx config checker (nginx -t
) it tells me that theres an error on line 74:
[emerg] unexpected end of file, expecting ";" or "}" in /config/nginx/site-confs/default:74
I've attached the contents of default
, but I really cant see why this is coming up. From what I can tell all of my blocks are closed correctly. Line 74 references the very last line of the file:
server {
listen 80;
server_name www.example.com, 192.168.187.10;
rewrite ^ https://$http_host$request_uri? permanent; # force redirect http to https
}
server {
listen 443 ssl default_server;
root /config/www;
index index.html index.htm index.php;
server_name www.example.com, 192.168.187.10;
ssl_certificate /config/keys/fullchain.pem;
ssl_certificate_key /config/keys/privkey.pem;
ssl_dhparam /config/nginx/dhparams.pem;
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA$
ssl_prefer_server_ciphers on;
proxy_set_header X-Forwarded-For $remote_addr;
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
client_max_body_size 0;
location / {
try_files $uri $uri/ /index.html /index.php?$args =404;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location /couchpotato {
proxy_pass http://192.168.187.10:5050/couchpotato;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /sonarr {
proxy_pass http://192.168.187.10:8989/sonarr;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /deluge {
proxy_pass http://192.168.187.10:8112/;
proxy_set_header X-Deluge-Base "/deluge/";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /emby {
proxy_pass http://192.168.187.10:8096/emby;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /zm {
proxy_pass http://192.168.187.10:808/zm;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Can anyone see the problem?