Skip to content

Commit f2e25dc

Browse files
committed
fix nginx conf to serve subdomains with www and api as well as acme challenge
1 parent f8268ce commit f2e25dc

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎nginx/nginx.conf‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ server {
1515
listen 80;
1616
listen [::]:80;
1717

18-
server_name sourcedepth.com 146.190.0.147;
18+
server_name sourcedepth.com www.sourcedepth.com 146.190.0.147;
1919
server_tokens off;
2020

2121
if ($host = 146.190.0.147) {
@@ -78,6 +78,10 @@ server {
7878
server_name api.sourcedepth.com;
7979
server_tokens off;
8080

81+
location /.well-known/acme-challenge/ {
82+
root /var/www/certbot;
83+
}
84+
8185
location / {
8286
return 301 https://api.sourcedepth.com$request_uri;
8387
}

0 commit comments

Comments
 (0)