--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/a8bf68cd-491a-4ae4-be45-16f013eb6aa1n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/350a3ab2-ef75-4a4e-9c2a-74f158ad0f3an%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/fad705f6-8c26-48ad-89a4-b39967897a35n%40googlegroups.com.
On 3 Dec 2021, at 1:42 pm, matkatmusic <matka...@gmail.com> wrote:Here is the part that gets included automatically from the VirtualHost directive for my site http://flask.chordieapp.comCpanel is automatically creating the VirtualHost directive, and the instructions say to create a file in /etc/apache2/conf.d/userdata/ and then either /std/ or /ssl/ for the site that was added.This is the http file: /etc/apache2/conf.d/userdata/std/2_4/bfxqsxmy/flask.chordieapp.com/flask.chordieapp.com.conf<IfModule alias_module>
WSGIDaemonProcess flaskapp python-home=/home/bfxqsxmy/public_html/flask/venv/WSGIProcessGroup flaskappWSGIScriptAlias /app /home/bfxqsxmy/public_html/flask/application.wsgi
Here is the https conf:</IfModule><Directory "/home/bfxqsxmy/public_html/flask/">Options FollowSymLinksAllowOverride NoneRequire all granted</Directory># ErrorLog ${APACHE_LOG_DIR}/error.logLogLevel warn# CustomLog ${APACHE_LOG_DIR}/access.log combined<IfModule alias_module># this daemon process was declared in the /std/ copy of this file (handler for http, not https)# WSGIDaemonProcess flaskapp python-home=/home/bfxqsxmy/public_html/flask/venv/WSGIProcessGroup flaskappWSGIScriptAlias /app /home/bfxqsxmy/public_html/flask/application.wsgi</IfModule><Directory "/home/bfxqsxmy/public_html/flask/">Options FollowSymLinksAllowOverride NoneRequire all granted</Directory># ErrorLog ${APACHE_LOG_DIR}/error.logLogLevel warn# CustomLog ${APACHE_LOG_DIR}/access.log combined
Here is the folder hierarchy over /public_html/flask
<Screen Shot 2021-12-02 at 6.36.04 PM.png>Here is the folder hierarchy of /public_html/flask/pfm/
<Screen Shot 2021-12-02 at 6.33.44 PM.png>Here is what is written in `application.wsgi`:1 python_home = '/home/bfxqsxmy/public_html/flask/venv'2 import sys3 import site45 # Calculate path to site-packages directory.67 python_version = '.'.join(map(str, sys.version_info[:2]))8 site_packages = python_home + '/lib/python%s/site-packages' % python_version910 # Add the site-packages directory.1112 site.addsitedir(site_packages)13 from pfm import test1 as test114 from test1 import app as application
Here's the error message: _wsgi (pid=13119, process='flaskapp', application='flask.chordieapp.com|/app'): Loading Python script file '/home/bfxqsxmy/public_html/flask/application.wsgi'. [Thu Dec 02 19:37:30.512141 2021] [wsgi:error] [pid 13119:tid 47096016185088] [remote 73.221.155.223:57349] mod_wsgi (pid=13119): Failed to exec Python script file '/home/bfxqsxmy/public_html/flask/application.wsgi'. [Thu Dec 02 19:37:30.512220 2021] [wsgi:error] [pid 13119:tid 47096016185088] [remote 73.221.155.223:57349] mod_wsgi (pid=13119): Exception occurred processing WSGI script '/home/bfxqsxmy/public_html/flask/application.wsgi'. [Thu Dec 02 19:37:30.512623 2021] [wsgi:error] [pid 13119:tid 47096016185088] [remote 73.221.155.223:57349] Traceback (most recent call last): [Thu Dec 02 19:37:30.512660 2021] [wsgi:error] [pid 13119:tid 47096016185088] [remote 73.221.155.223:57349]File "/home/bfxqsxmy/public_html/flask/application.wsgi", line 13, in <module> [Thu Dec 02 19:37:30.512664 2021] [wsgi:error] [pid 13119:tid 47096016185088] [remote 73.221.155.223:57349] from pfm import test1 as test1 [Thu Dec 02 19:37:30.512690 2021] [wsgi:error] [pid 13119:tid 47096016185088] [remote 73.221.155.223:57349] ModuleNotFoundError: No module named 'pfm'When I comment everything out in application.wsgi and use your 'hello world' script instead, I see 'hello world' when I visit the URL to the app:
def application(environ, start_response):status = '200 OK'output = b'Hello World!'response_headers = [('Content-type', 'text/plain'),('Content-Length', str(len(output)))]start_response(status, response_headers)return [output]
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/dc970e73-cada-423e-97c3-1f463120c12fn%40googlegroups.com.
<Screen Shot 2021-12-02 at 6.22.48 PM.png><Screen Shot 2021-12-02 at 6.33.44 PM.png><Screen Shot 2021-12-02 at 6.36.04 PM.png>
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/55533b55-7a60-4843-b4ac-7b0453f37849n%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "modwsgi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/modwsgi/6V7Ueg8phZA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to modwsgi+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/6D874695-BDB4-4C5F-947E-137DDB250FDE%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/CANXHmywJ23H0o4Y3VAChChY6pn_ZYpnteex3SWMfdRr1v8u57A%40mail.gmail.com.