Hallo
Ich hab eine Nginx website config die bei nginx reload immer einen fehler wirft
nginx: [emerg] unexpected end of file, expecting ";" or "}" in /etc/nginx/sites-enabled/test.example.com:37
Ich hab eine Nginx website config die bei nginx reload immer einen fehler wirft
nginx: [emerg] unexpected end of file, expecting ";" or "}" in /etc/nginx/sites-enabled/test.example.com:37
Code:
server {
listen 80;
server_name test.example.com;
# Redirect any HTTP request to HTTPS
return 301 https://$server_name$request_uri;
error_log /var/log/nginx/test.example.com-error.log;
access_log /var/log/nginx/test.example.com-access.log;
}
server {
listen 443;
server_name test.example.com;
# Enable SSL
ssl on;
ssl_certificate /etc/nginx/certs/test.example.com.crt;
ssl_certificate_key /etc/nginx/certs/test.example.com.key;
ssl_session_timeout 5m;
ssl_dhparam /etc/nginx/dhparam.pem;
ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256$
# Set HSTS to 365 days
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains';
# Set global proxy settings
proxy_read_timeout 360;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
client_max_body_size 2048M;
location / { proxy_pass https://192.168.0.101;}
#
error_log /var/log/nginx/test.example.com-ssl-error.log;
access_log /var/log/nginx/test.example.com-ssl-access.log;
}