Skip to content

Instantly share code, notes, and snippets.

@Reagent992
Created August 17, 2023 14:12
Show Gist options
  • Save Reagent992/e48b4d2c19dfe85b32816f83e01184f3 to your computer and use it in GitHub Desktop.
Save Reagent992/e48b4d2c19dfe85b32816f83e01184f3 to your computer and use it in GitHub Desktop.
temp_nginx_confix
server {
server_name simpletodo.webhop.me;
location /api/ {
proxy_pass http://127.0.0.1:8000;
}
location /admin/ {
proxy_pass http://127.0.0.1:8000;
}
location / {
root /var/www/taski;
index index.html index.htm;
try_files $uri /index.html;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/simpletodo.webhop.me/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/simpletodo.webhop.me/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 {
server_name catpictures.webhop.me;
location /media/ {
root /var/www/kittygram;
}
location /api/ {
proxy_pass http://127.0.0.1:8080;
client_max_body_size 20M;
}
location /admin/ {
proxy_pass http://127.0.0.1:8080;
client_max_body_size 20M;
}
location / {
root /var/www/kittygram;
index index.html index.htm;
try_files $uri /index.html;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/catpictures.webhop.me/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/catpictures.webhop.me/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 = simpletodo.webhop.me) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name 158.160.28.176 simpletodo.webhop.me;
return 404; # managed by Certbot
}
server {
if ($host = catpictures.webhop.me) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name catpictures.webhop.me;
listen 80;
return 404; # managed by Certbot
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment