Jump to content

Recommended Posts

Posted (edited)

Edit: How do I identify which server i'm on? (e.g. morty, etc..)
reading here, but not really sure what to make of it. also, the examples provided are for a Plesk install, but i'm on a VPS w/ Hestia.

My past Experience w/ Python web apps:
i've installed (on my private LAN, debian setup) and run Python Flask (and Django, and the Jupyter notebook thing,etc.)
my setup required Gunicorn. that's right at the time that i incurred the brain damage. that's basically where i was, but i totally can't remember... i guess it doesn't matter for an Apache Server?

or maybe Gunicorn was independent of NGINX. maybe it doesn't matter w/ the Helio servers?

i find it confusing before i get started, because I don't see you guys talking about that sort of setup at https://wiki.helionet.org/Flask 

i must be forgetting something simple. 

Suggestions? 

Edited by ajaxStardust
Posted (edited)

trying this way...

Options +ExecCGI
AddHandler cgi-script .py
RewriteEngine On
# RewriteBase /flaskdemo
RewriteBase /
RewriteRule ^(media/.*)$ - [L]
RewriteRule ^(admin_media/.*)$ - [L]
RewriteRule ^(flask\.wsgi/.*)$ - [L]
RewriteRule ^(.*)$ flaskdemo/flask.wsgi/$1 [QSA,PT,L]

i am getting the heliohost/ hestia default 404 -- so i guess that's a good sign for the .htaccess? 
 

import os, sys

# edit your path below
sys.path.append("/home/admin/web/vps111.heliohost.us/public_html/flaskdemo");

sys.path.insert(0, os.path.dirname(__file__))
from myapp import app as application

# set this to something harder to guess
application.secret_key = 'secret'
does that look correct for the wsgi file? if my path is ./flaskdemo 

the (presumed) public url being

https://vps111.heliohost.us/flaskdemo

image.png

Edited by ajaxStardust
detail - add htaccess
Posted (edited)

Apache error log.
this FCGI error is unfamiliar to me / the www.sock :80 failed....
i presume this is my indicator, but ... i'll have to do the research unless someone's got a tip.
:D

the httpd-UDS as well.

[Wed Apr 30 03:48:58.374567 2025] [proxy:error] [pid 72708:tid 128099924526784] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/www.sock (*:80) failed
[Wed Apr 30 03:48:58.381231 2025] [proxy_fcgi:error] [pid 72708:tid 128099924526784] [client 3.91.234.168:0] AH01079: failed to make connection to backend: httpd-UDS
[Wed Apr 30 04:58:41.895438 2025] [mpm_event:notice] [pid 1707:tid 128100116670336] AH00492: caught SIGWINCH, shutting down gracefully
[Wed Apr 30 04:58:43.446353 2025] [ssl:warn] [pid 105503:tid 129081561003904] AH01909: 65.19.154.77:443:0 server certificate does NOT include an ID which matches the server name
[Wed Apr 30 04:58:43.446631 2025] [suexec:notice] [pid 105503:tid 129081561003904] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Apr 30 04:58:43.477866 2025] [ssl:warn] [pid 105504:tid 129081561003904] AH01909: 65.19.154.77:443:0 server certificate does NOT include an ID which matches the server name
[Wed Apr 30 04:58:43.479642 2025] [mpm_event:notice] [pid 105504:tid 129081561003904] AH00489: Apache/2.4.58 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/3.0.13 configured -- resuming normal operations
[Wed Apr 30 04:58:43.479663 2025] [core:notice] [pid 105504:tid 129081561003904] AH00094: Command line: '/usr/sbin/apache2'
: failed to make connection to backend: httpd-UDS
Edited by ajaxStardust
Guest
This topic is now closed to further replies.
×
×
  • Create New...