Hi,
following setup:
Strato VM with Ubuntu 18.04.5 LTS using Plesk 18.0.32 and subdomain with LetsEncrypt for cloud
Seafile Pro 7.1.10
Nginx 1.18.0.2
MariaDB 10.5.8
When accessing via https I get an 502 Bad gateway error. This setup has never worked.
Here is the nginx.conf for this subdomain
#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
server {
listen 85.214.191.79:443 ssl;
server_name cloud.val-trackdays.de;
server_name www.cloud.val-trackdays.de;
server_name ipv4.cloud.val-trackdays.de;
ssl_certificate /opt/psa/var/certificates/scfIK2NBQ;
ssl_certificate_key /opt/psa/var/certificates/scfIK2NBQ;
client_max_body_size 128m;
root "/var/www/vhosts/val-trackdays.de/cloud.val-trackdays.de";
access_log "/var/www/vhosts/system/cloud.val-trackdays.de/logs/proxy_access_ssl_log";
error_log "/var/www/vhosts/system/cloud.val-trackdays.de/logs/proxy_error_log";
#extension letsencrypt begin
location ^~ /.well-known/acme-challenge/ {
root /var/www/vhosts/default/htdocs;
types { }
default_type text/plain;
satisfy any;
auth_basic off;
allow all;
location ~ ^/\.well-known/acme-challenge.*/\. {
deny all;
}
}
#extension letsencrypt end
location ~ /\.ht {
deny all;
}
disable_symlinks if_not_owner "from=/var/www/vhosts/val-trackdays.de";
add_header X-Powered-By PleskLin;
include "/var/www/vhosts/system/cloud.val-trackdays.de/conf/vhost_nginx.conf";
}
server {
listen 85.214.191.79:80;
server_name cloud.val-trackdays.de;
server_name www.cloud.val-trackdays.de;
server_name ipv4.cloud.val-trackdays.de;
client_max_body_size 128m;
}
and here the vhost_nginx.conf with the extra config via Plesk
proxy_set_header X-Forwarded-For $remote_addr;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_read_timeout 1200s;
# used for view/edit office file via Office Online Server
client_max_body_size 0;
access_log /var/log/nginx/seahub.access.log;
error_log /var/log/nginx/seahub.error.log;
}
location /seafhttp {
rewrite ^/seafhttp(.*)$ $1 break;
proxy_pass http://127.0.0.1:8082;
client_max_body_size 0;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 36000s;
proxy_read_timeout 36000s;
proxy_send_timeout 36000s;
send_timeout 36000s;
access_log /var/log/nginx/seafhttp.access.log ;
error_log /var/log/nginx/seafhttp.error.log;
}
location /media {
root /home/seafile/seafile-server-latest/seahub;
}
and here is the ccnet.conf file
[General]
SERVICE_URL = https://cloud.val-trackdays.de
[Database]
ENGINE = mysql
HOST = 127.0.0.1
PORT = 3306
USER = seafilesql
PASSWD = xxxxxxxxxxxxxx
DB = ccnet-db
CONNECTION_CHARSET = utf8
and here is the seafile.conf file
[fileserver]
port = 8082
host = 127.0.0.1
[database]
type = mysql
host = 127.0.0.1
port = 3306
user = seafilesql
password = xxxxxxxxxxx
db_name = seafile-db
connection_charset = utf8
and here is seahub_settings.py
- - coding: utf-8 - -
SECRET_KEY = “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx’”
FILE_SERVER_ROOT = ‘https://cloud.val-trackdays.de/seafhttp’
DATABASES = {
‘default’: {
‘ENGINE’: ‘django.db.backends.mysql’,
‘NAME’: ‘seahub-db’,
‘USER’: ‘seafilesql’,
‘PASSWORD’: ‘xxxxxxxxxxxxx’,
‘HOST’: ‘127.0.0.1’,
‘PORT’: ‘3306’
}
}
Here is an error log from seahub.error.log
2021/01/21 17:02:11 [error] 377#0: *26 upstream prematurely closed connection while reading response header from upstream, client: 185.156.75.59, server: cloud.val-trackdays.de, request: “GET / HTTP/1.1”, upstream: “http://127.0.0.1:8000/”, host: “cloud.val-trackdays.de”
2021/01/21 17:02:11 [error] 377#0: *26 upstream prematurely closed connection while reading response header from upstream, client: 185.156.75.59, server: cloud.val-trackdays.de, request: “GET /favicon.ico HTTP/1.1”, upstream: “http://127.0.0.1:8000/favicon.ico”, host: “cloud.val-trackdays.de”, referrer: “https://cloud.val-trackdays.de/ ”
Anything else needed? Let me know…
thx,
Lino