Last active
June 5, 2018 12:31
-
-
Save geetotes/0ddc96f95eecab4e8aa8dd53bcc70661 to your computer and use it in GitHub Desktop.
status.icu nginx configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
root /var/www/status.icu; | |
index index.html; | |
server_name status.icu; | |
location / { | |
try_files $uri $uri/ =500; | |
} | |
location ~ /200 { | |
return 200 '200 ok'; | |
add_header Content-Type text/plain; | |
} | |
location ~ /201 { | |
return 201; | |
} | |
location ~ /202 { | |
return 202; | |
} | |
location ~ /204 { | |
return 204; | |
} | |
location ~ /401 { | |
return 401; | |
} | |
location ~ /402 { | |
return 402; | |
} | |
location ~ /403 { | |
return 403; | |
} | |
location ~ /404 { | |
return 404; | |
} | |
location ~ /422 { | |
return 422; | |
} | |
location ~ /500 { | |
return 500; | |
} | |
listen [::]:443 ssl ipv6only=on; # managed by Certbot | |
listen 443 ssl; # managed by Certbot | |
ssl_certificate /etc/letsencrypt/live/status.icu/fullchain.pem; # managed by Certbot | |
ssl_certificate_key /etc/letsencrypt/live/status.icu/privkey.pem; # managed by Certbot | |
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot | |
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot | |
} | |
server { | |
if ($host = status.icu) { | |
return 301 https://$host$request_uri; | |
} # managed by Certbot | |
listen 80; | |
listen [::]:80; | |
server_name status.icu; | |
return 404; # managed by Certbot | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You do not reveal your logs configuration.
With this config, you can still have log file enable in main http block.