diff --git a/install/postiz-install.sh b/install/postiz-install.sh index 02709746d..893d701a6 100644 --- a/install/postiz-install.sh +++ b/install/postiz-install.sh @@ -159,6 +159,9 @@ server { client_max_body_size 100M; + gzip on; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; + location /api/ { proxy_pass http://127.0.0.1:3000/; proxy_http_version 1.1; @@ -168,14 +171,21 @@ server { proxy_set_header X-Real-IP \$remote_addr; proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto \$scheme; + proxy_set_header Reload \$http_reload; + proxy_set_header Onboarding \$http_onboarding; + proxy_set_header Activate \$http_activate; + proxy_set_header Auth \$http_auth; + proxy_set_header Showorg \$http_showorg; + proxy_set_header Impersonate \$http_impersonate; + proxy_set_header Accept-Language \$http_accept_language; } - location /uploads { - alias /opt/postiz/uploads; + location /uploads/ { + alias /opt/postiz/uploads/; } location / { - proxy_pass http://127.0.0.1:4200; + proxy_pass http://127.0.0.1:4200/; proxy_http_version 1.1; proxy_set_header Upgrade \$http_upgrade; proxy_set_header Connection "upgrade"; @@ -183,13 +193,22 @@ server { proxy_set_header X-Real-IP \$remote_addr; proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto \$scheme; + proxy_set_header Reload \$http_reload; + proxy_set_header Onboarding \$http_onboarding; + proxy_set_header Activate \$http_activate; + proxy_set_header Auth \$http_auth; + proxy_set_header Showorg \$http_showorg; + proxy_set_header Impersonate \$http_impersonate; + proxy_set_header Accept-Language \$http_accept_language; + proxy_set_header i18next \$http_i18next; } } EOF ln -sf /etc/nginx/sites-available/postiz /etc/nginx/sites-enabled/postiz rm -f /etc/nginx/sites-enabled/default $STD nginx -t -$STD systemctl enable --now nginx +systemctl enable -q nginx +systemctl reload -q nginx msg_ok "Configured Nginx" motd_ssh diff --git a/install/simplelogin-install.sh b/install/simplelogin-install.sh index cbde6a72d..cfa672e93 100644 --- a/install/simplelogin-install.sh +++ b/install/simplelogin-install.sh @@ -42,7 +42,7 @@ msg_info "Installing SimpleLogin (Patience)" cd /opt/simplelogin $STD uv venv $STD uv pip install setuptools hatchling editables -$STD uv sync --locked --no-dev --no-build-isolation +$STD uv sync --locked --no-dev --no-build-isolation --no-install-package newrelic if [[ -f /opt/simplelogin/static/package.json ]]; then cd /opt/simplelogin/static diff --git a/install/yamtrack-install.sh b/install/yamtrack-install.sh index 1a138cdd9..a3720b79d 100644 --- a/install/yamtrack-install.sh +++ b/install/yamtrack-install.sh @@ -53,6 +53,7 @@ msg_info "Configuring Nginx" rm -f /etc/nginx/sites-enabled/default /etc/nginx/sites-available/default cp /opt/yamtrack/nginx.conf /etc/nginx/nginx.conf sed -i 's|user abc;|user www-data;|' /etc/nginx/nginx.conf +sed -i 's|pid /tmp/nginx.pid;|pid /run/nginx.pid;|' /etc/nginx/nginx.conf sed -i 's|/yamtrack/staticfiles/|/opt/yamtrack/src/staticfiles/|' /etc/nginx/nginx.conf sed -i 's|error_log /dev/stderr|error_log /var/log/nginx/error.log|' /etc/nginx/nginx.conf sed -i 's|access_log /dev/stdout|access_log /var/log/nginx/access.log|' /etc/nginx/nginx.conf