Yunohost 11.2.4
Running on Lenovo Mystery PC
I’m running a Yunohost server on a Lenovo thin client. I want to install some resource-heavy apps on another identical server to spread the load a bit. However, I’m having trouble forwarding to the second server. 80 and 443 are going to my primary yuno1 server, and I attempted forwarding to a second instance using the reverse proxy through the “redirect” app with its own domain.
However, it fails with “too many redirects.” I tried setting the yuno2 yunohost server’s main domain to both the dedicated domain and to its local IP address. No luck. Here is the default config:
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
listen [::]:80;
server_name yuno2.mydomain.com xmpp-upload.yuno2.mydomain.com muc.yuno2.mydomain.com;
access_by_lua_file /usr/share/ssowat/access.lua;
include /etc/nginx/conf.d/acme-challenge.conf.inc;
location ^~ '/.well-known/ynh-diagnosis/' {
alias /var/www/.well-known/ynh-diagnosis/;
}
location ^~ '/.well-known/autoconfig/mail/' {
alias /var/www/.well-known/yuno2.mydomain.com/autoconfig/mail/;
}
location / {
return 301 https://$host$request_uri;
}
include /etc/nginx/conf.d/yunohost_http_errors.conf.inc;
access_log /var/log/nginx/yuno2.mydomain.com-access.log;
error_log /var/log/nginx/yuno2.mydomain.com-error.log;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name yuno2.mydomain.com;
include /etc/nginx/conf.d/security.conf.inc;
ssl_certificate /etc/yunohost/certs/yuno2.mydomain.com/crt.pem;
ssl_certificate_key /etc/yunohost/certs/yuno2.mydomain.com/key.pem;
location ^~ '/.well-known/autoconfig/mail/' {
alias /var/www/.well-known/yuno2.mydomain.com/autoconfig/mail/;
}
access_by_lua_file /usr/share/ssowat/access.lua;
include /etc/nginx/conf.d/yuno2.mydomain.com.d/*.conf;
include /etc/nginx/conf.d/yunohost_sso.conf.inc;
include /etc/nginx/conf.d/yunohost_admin.conf.inc;
include /etc/nginx/conf.d/yunohost_api.conf.inc;
include /etc/nginx/conf.d/yunohost_http_errors.conf.inc;
access_log /var/log/nginx/yuno2.mydomain.com-access.log;
error_log /var/log/nginx/yuno2.mydomain.com-error.log;
}
# vhost dedicated to XMPP http_upload
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name xmpp-upload.yuno2.mydomain.com;
root /dev/null;
location /upload/ {
alias /var/xmpp-upload/yuno2.mydomain.com/upload/;
# Pass all requests to metronome, except for GET and HEAD requests.
limit_except GET HEAD {
proxy_pass http://localhost:5290;
}
include proxy_params;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'HEAD, GET, PUT, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'Authorization';
add_header 'Access-Control-Allow-Credentials' 'true';
client_max_body_size 105M; # Choose a value a bit higher than the max upload configured in XMPP server
}
include /etc/nginx/conf.d/security.conf.inc;
ssl_certificate /etc/yunohost/certs/yuno2.mydomain.com/crt.pem;
ssl_certificate_key /etc/yunohost/certs/yuno2.mydomain.com/key.pem;
access_log /var/log/nginx/xmpp-upload.yuno2.mydomain.com-access.log;
error_log /var/log/nginx/xmpp-upload.yuno2.mydomain.com-error.log;
}
How can I (if at all) edit this to work like that?