hello one and all,
ok, I'm attempting to deploy on debian 13.2 trixie and nginx 1.26.3 with py4web working on port 8000, all brand new releases and versions. so these work:
where the latter throws 404 as it should. so py4web is working nicely off of the port using a systemctl script essentially started via:
ExecStart=/opt/python/bin/python /opt/python/bin/py4web run -H '0.0.0.0' -P '8000' -p '/opt/python/bin/password.txt' /opt/python/bin/apps
I'm trying to get nginx to serve the pages via port 80 right now, later 443. so, my nginx config file looks like:
server {
listen 80;
server_name $hostname;
proxy_http_version 1.1;
location / {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $http_host;
proxy_redirect off;
proxy_set_header X-PY4WEB-APPNAME /_dashboard;
proxy_pass
http://127.0.0.1:
8000/_dashboard$request_uri;
}
location ~* ^/(\w+)/static(?:/_[\d]+\.[\d]+\.[\d]+)?/(.*)$ {
alias /opt/python/bin/apps/$1/static/$2;
expires max;
}
}
in the /etc/nginx/sites-available/dashboard.conf file with the appropriate symbolic link under sites-enabled folder. and similar with documentation.conf file except replace "_dashboard" with "_documentation".
I just can not figure out a configuration of the two files to the two different apps where it consistently works for like:
where nginx is handing off to py4web's 8000 port.
I see a lot of installing uwsgi for py4web but I thought we didn't need to do that if rocket/ombott is running off of port 8000? maybe I'm wrong, not sure. and what am I doing wrong on my nginx config files???
thank you in advance, lucas