nginx-yetti-addplidasite
This is an old revision of the document!
The Yetti setup involves a private home server and a public virtual one, so the setup is a bit tricky.
Public virtual server (Portal)
Portal is responsible for redirecting user's requests to the containers at Yetti.
To add a new page, a config file is created at /etc/nginx/sites-enabled:
server {
server_name subdomain.plida.ru;
location / {
resolver 10.227.15.1:53 valid=30s;
set $proxy_host container_name.yetti;
proxy_pass http://$proxy_host;
include proxy_params;
}
With certbot https is configured: certbot --nginx, the correct config file needs to be inputted.
service nginx reload
Private home server (Yetti)
Assuming our path is /var/www/project
server {
listen 80;
add_header x-who container_name.yetti;
server_name _;
index index.php index.html;
root /var/www/project/public;
location /m/ { # media
alias /var/www/project/public/images/;
}
location / {
try_files $uri $uri/ =404;
}
}
service nginx reload
That should be it.
nginx-yetti-addplidasite.1756672008.txt.gz · Last modified: by admin
