Skip to content

Commit

Permalink
Merge pull request #111 from Pet-projects-CodePET/feature/ssl
Browse files Browse the repository at this point in the history
-443
  • Loading branch information
VladislavCR authored Mar 12, 2024
2 parents 6cbb35b + 301bacb commit 563b706
Showing 1 changed file with 61 additions and 61 deletions.
122 changes: 61 additions & 61 deletions infra/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,64 +29,64 @@ server {
}
}

server {
listen 443 default_server ssl http2;
listen [::]:443 ssl http2;
server_name 89.23.117.80 devcodepet.tw1.ru;

ssl_certificate /etc/nginx/ssl/live/devcodepet.tw1.ru/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/live/devcodepet.tw1.ru/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

root /staticfiles;

location /api/v1/ {
proxy_set_header Host $http_host;
proxy_pass http://backend:8000/api/v1/;
}
location /admin/ {
proxy_set_header Host $http_host;
proxy_pass http://backend:8000/admin/;
}

location / {
try_files $uri $uri.html $uri/ =404;
}

error_page 404 /404.html;
location = /404.html {
internal;
}
}

server {
listen 443 default_server ssl http2;
listen [::]:443 ssl http2;
server_name 89.23.117.168 testcodepet.tw1.ru;

ssl_certificate /etc/nginx/ssl/live/testcodepet.tw1.ru/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/live/testcodepet.tw1.ru/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

root /staticfiles;

location /api/v1/ {
proxy_set_header Host $http_host;
proxy_pass http://backend:8000/api/v1/;
}
location /admin/ {
proxy_set_header Host $http_host;
proxy_pass http://backend:8000/admin/;
}

location / {
try_files $uri $uri.html $uri/ =404;
}

error_page 404 /404.html;
location = /404.html {
internal;
}
}
# server {
# listen 443 default_server ssl http2;
# listen [::]:443 ssl http2;
# server_name 89.23.117.80 devcodepet.tw1.ru;

# ssl_certificate /etc/nginx/ssl/live/devcodepet.tw1.ru/fullchain.pem;
# ssl_certificate_key /etc/nginx/ssl/live/devcodepet.tw1.ru/privkey.pem;
# include /etc/letsencrypt/options-ssl-nginx.conf;
# ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

# root /staticfiles;

# location /api/v1/ {
# proxy_set_header Host $http_host;
# proxy_pass http://backend:8000/api/v1/;
# }
# location /admin/ {
# proxy_set_header Host $http_host;
# proxy_pass http://backend:8000/admin/;
# }

# location / {
# try_files $uri $uri.html $uri/ =404;
# }

# error_page 404 /404.html;
# location = /404.html {
# internal;
# }
# }

# server {
# listen 443 default_server ssl http2;
# listen [::]:443 ssl http2;
# server_name 89.23.117.168 testcodepet.tw1.ru;

# ssl_certificate /etc/nginx/ssl/live/testcodepet.tw1.ru/fullchain.pem;
# ssl_certificate_key /etc/nginx/ssl/live/testcodepet.tw1.ru/privkey.pem;
# include /etc/letsencrypt/options-ssl-nginx.conf;
# ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

# root /staticfiles;

# location /api/v1/ {
# proxy_set_header Host $http_host;
# proxy_pass http://backend:8000/api/v1/;
# }
# location /admin/ {
# proxy_set_header Host $http_host;
# proxy_pass http://backend:8000/admin/;
# }

# location / {
# try_files $uri $uri.html $uri/ =404;
# }

# error_page 404 /404.html;
# location = /404.html {
# internal;
# }
# }

0 comments on commit 563b706

Please sign in to comment.