Welcome! Log In Create A New Profile

Advanced

Nginx & Gunicorn

Posted by peya02 
Nginx & Gunicorn
September 06, 2024 03:24AM
Hola,
tengo un proyecto en flask, con su nginx & gunicorn configurado para produccion. Deseo poder modificar esta configuracion para que a parte de produccion tambien tenga la parte dev, osea que a parte de la url prod.xxx.es tambien tenga la dev.xxx.es que es donde hagas las pruebas de codigo nuevo.
Tengo el siguiente archivo configurado:


----------------------

server {
server_name prod.xxx.es www.prod.xxx.es;

location / {
include proxy_params;
proxy_pass http://unix:/home/albert/myproject/myproject.sock;
}

listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/prod.xxx.es/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/prod.xxx.es/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 = www.prod.xxx.es) {
return 301 https://$host$request_uri;
} # managed by Certbot


if ($host = prod.xxx.es) {
return 301 https://$host$request_uri;
} # managed by Certbot


listen 80;
server_name prod.xxx.es www.prod.xxx.es;
return 404; # managed by Certbot


----------------------


¿como podria modificarlo para que tenga la parte de dev?

gracias.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 167
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready