diff --git a/nginx/production.conf b/nginx/production.conf index dccba300..89ed51e7 100644 --- a/nginx/production.conf +++ b/nginx/production.conf @@ -10,7 +10,7 @@ server { listen 80; listen [::]:80; - server_name cportal.acconcept.ru api.cportal.acconcept.ru; + server_name cportal.acconcept.ru www.cportal.acconcept.ru; server_tokens off; location /.well-known/acme-challenge/ { @@ -18,7 +18,23 @@ server { } location / { - return 301 https://example.org$request_uri; + return 301 https://cportal.acconcept.ru$request_uri; + } +} + +server { + listen 80; + listen [::]:80; + + server_name api.cportal.acconcept.ru www.api.cportal.acconcept.ru; + server_tokens off; + + location /.well-known/acme-challenge/ { + root /var/www/certbot; + } + + location / { + return 301 https://api.cportal.acconcept.ru$request_uri; } }