Flask wsgi app cannot work with WSGI Module
-
- Posts: 19
- Joined: 2018/05/10 20:36:20
Re: Flask wsgi app cannot work with WSGI Module
So, how you think i should set it up? i only want wsgi to run in domain superhost.gr and i have only 3 scripts inside it.
-
- Posts: 2019
- Joined: 2015/02/17 15:14:33
- Location: Bulgaria
- Contact:
Re: Flask wsgi app cannot work with WSGI Module
I will try to recreate your setup and will provide the setup steps.
Keeep in mind that I use and recomend SELINUX for internet facing systems. The positives are much more than the complexity.
Keeep in mind that I use and recomend SELINUX for internet facing systems. The positives are much more than the complexity.
-
- Posts: 19
- Joined: 2018/05/10 20:36:20
Re: Flask wsgi app cannot work with WSGI Module
Thanks for your time and effort!
-
- Posts: 2019
- Joined: 2015/02/17 15:14:33
- Location: Bulgaria
- Contact:
Re: Flask wsgi app cannot work with WSGI Module
Ok, I have deployed a simple wsgi on a test instance and here is my history .
The sample wsgi code is this one:
As you can see, wcgi works even as "/" like a charm without any issues.
Repo list:
Edit: I forgot to provide the conf before deleting the instance, but it should be something like:
The sample wsgi code is this one:
Code: Select all
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]
Repo list:
Code: Select all
]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.steadfastnet.com
* epel: mirror.steadfastnet.com
* extras: ftpmirror.your.org
* updates: mirrors.liquidweb.com
repo id repo name status
base/7/x86_64 CentOS-7 - Base 9,911
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 12,672
extras/7/x86_64 CentOS-7 - Extras 402
google-cloud-compute Google Cloud Compute 10
google-cloud-sdk Google Cloud SDK 278
updates/7/x86_64 CentOS-7 - Updates 1,333
repolist: 24,606
Code: Select all
<Directory /srv/myapp>
Require all granted
</Directory>
<VirtualHost *:80>
DocumentRoot "/var/www/html"
ServerName your-FQDN
WSGIScriptAlias / /srv/myapp/myapp.py
</VirtualHost>