Discussion:
[modwsgi] Python Flask wsgi app cannot work with WSGI Module
n***@gmail.com
2018-08-29 16:41:27 UTC
Permalink
<VirtualHost *:80>
ServerName superhost.gr
ServerAdmin ***@superhost.gr

WSGIDaemonProcess public_html user=nikos group=nikos processes=1 threads=5
WSGIScriptAlias / /home/nikos/public_html/webapp.py

ProxyPass / http://superhost.gr:5000/
ProxyPassReverse / http://superhost:5000/

<Directory /home/nikos/public_html>
WSGIProcessGroup public_html
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On

AddHandler wsgi-script .wsgi .py
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI

AllowOverride None
Require all granted
</Directory></VirtualHost>


Hello, 3 days now i;m facing the same problem i have installed python36u-mod_wsgi module because mod_wsgi coudl not be isntalled.

I reinstalled anything from scratch but still my wsgi webapp.py application wont run.

Please help me out. The above is httpd-vhosts.conf as i have configured it.

I'am running on centOS 7 with python36u installed and Apache Web Server.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Graham Dumpleton
2018-08-30 00:04:13 UTC
Permalink
What is the full details of the error you are getting? Apache error message in browser. Errors in log including any Python stack trace.
Post by n***@gmail.com
<VirtualHost *:80>
ServerName superhost.gr
WSGIDaemonProcess public_html user=nikos group=nikos processes=1 threads=5
WSGIScriptAlias / /home/nikos/public_html/webapp.py
ProxyPass / http://superhost.gr:5000/
ProxyPassReverse / http://superhost:5000/
<Directory /home/nikos/public_html>
WSGIProcessGroup public_html
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
AddHandler wsgi-script .wsgi .py
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
Hello, 3 days now i;m facing the same problem i have installed python36u-mod_wsgi module because mod_wsgi coudl not be isntalled.
I reinstalled anything from scratch but still my wsgi webapp.py application wont run.
Please help me out. The above is httpd-vhosts.conf as i have configured it.
I'am running on centOS 7 with python36u installed and Apache Web Server.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
n***@gmail.com
2018-08-30 09:08:25 UTC
Permalink
Hello the flask vevelopmnet web server listens on http://superhost.gr:5000
and runs but in does not listen to http://superhost.gr:80 which is being
managed by Apache.
It seem like Apache is not aware of mod_wsgi application. Here:



[***@superhost ~]# yum list installed | grep python36
python36u.x86_64 3.6.5-1.ius.centos7 @ius
python36u-devel.x86_64 3.6.5-1.ius.centos7 @ius
python36u-libs.x86_64 3.6.5-1.ius.centos7 @ius
python36u-mod_wsgi.x86_64 4.6.2-1.ius.centos7 @ius
python36u-pip.noarch 9.0.1-1.ius.centos7 @ius
python36u-setuptools.noarch 39.0.1-1.ius.centos7 @ius


and


[***@superhost public_html]# mod_wsgi-express start-server webapp.py
[***@superhost public_html]$ mod_wsgi-express start-server webapp.py
Server URL : http://localhost:8000/
Server Root : /tmp/mod_wsgi-localhost:8000:1021
Server Conf : /tmp/mod_wsgi-localhost:8000:1021/httpd.conf
Error Log File : /tmp/mod_wsgi-localhost:8000:1021/error_log (warn)
Request Capacity : 5 (1 process * 5 threads)
Request Timeout : 60 (seconds)
Startup Timeout : 15 (seconds)
Queue Backlog : 100 (connections)
Queue Timeout : 45 (seconds)
Server Capacity : 20 (event/worker), 20 (prefork)
Server Backlog : 500 (connections)
Locale Setting : en_US.UTF-8
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:8000
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:8000
no listening sockets available, shutting down
AH00015: Unable to open logs
[***@superhost public_html]$


All i want to do is wehn my flask webapp.py run is intead of being run by the development server on port 5000 to be run by Aapche on port 80.

I dont know why epxress module mentiones port 8000 .....
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Graham Dumpleton
2018-08-30 09:34:08 UTC
Permalink
A few things.

The first is that mod_wsgi-express is intended for running a distinct Apache instance to you main Apache instance. It mentions port 8000 because that is the port it will use by default. So it isn't modifying your main Apache installation and you can't take over port 80 when using it unless you disable your main Apache instance and then do various configuration to have it run on port 80 as explained in:

https://pypi.org/project/mod_wsgi/ <https://pypi.org/project/mod_wsgi/>

The second is that mod_wsgi-express is showing an error that something is already using port 8000, so you can't use that port either.

Finally, if you are installing 'python36u-mod_wsgi.x86_64' you shouldn't even need to install mod_wsgi-express separately as you have. Just configure your main Apache to host your WSGI application using mod_wsgi and don't use mod_wsgi-express.

See the Flask docs for an example. You will be using a different system mod_wsgi package is all.
Hello the flask vevelopmnet web server listens on http://superhost.gr:5000 and runs but in does not listen to http://superhost.gr:80 which is being managed by Apache.
and
Server URL : http://localhost:8000/
Server Root : /tmp/mod_wsgi-localhost:8000:1021
Server Conf : /tmp/mod_wsgi-localhost:8000:1021/httpd.conf
Error Log File : /tmp/mod_wsgi-localhost:8000:1021/error_log (warn)
Request Capacity : 5 (1 process * 5 threads)
Request Timeout : 60 (seconds)
Startup Timeout : 15 (seconds)
Queue Backlog : 100 (connections)
Queue Timeout : 45 (seconds)
Server Capacity : 20 (event/worker), 20 (prefork)
Server Backlog : 500 (connections)
Locale Setting : en_US.UTF-8
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:8000
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:8000
no listening sockets available, shutting down
AH00015: Unable to open logs
All i want to do is wehn my flask webapp.py run is intead of being run by the development server on port 5000 to be run by Aapche on port 80.
I dont know why epxress module mentiones port 8000 .....
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Νίκος @ SuperHost
2018-08-30 10:05:29 UTC
Permalink
ok, i have un-installed python36u-mod_wsgi and just installes yum install
mod_wsgi

then i used the configuration i mentioned in my 1st post and i still get
this error whn i http://superhost.gr

Forbidden: You don't have permission to access / on this server.
Why Apache since i have configured it correctly wont take over ?
Then only way i cna see my webpage is only if i http://superhost.gr:5000

I need the latter to send data on Apache's port 80. Why isnt this happening?



Στις ΠέΌ, 30 Αυγ 2018 στις 12:34 ÎŒ.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
A few things.
The first is that mod_wsgi-express is intended for running a distinct
Apache instance to you main Apache instance. It mentions port 8000 because
that is the port it will use by default. So it isn't modifying your main
Apache installation and you can't take over port 80 when using it unless
you disable your main Apache instance and then do various configuration to
https://pypi.org/project/mod_wsgi/
The second is that mod_wsgi-express is showing an error that something is
already using port 8000, so you can't use that port either.
Finally, if you are installing 'python36u-mod_wsgi.x86_64' you shouldn't
even need to install mod_wsgi-express separately as you have. Just
configure your main Apache to host your WSGI application using mod_wsgi and
don't use mod_wsgi-express.
See the Flask docs for an example. You will be using a different system
mod_wsgi package is all.
Hello the flask vevelopmnet web server listens on http://superhost.gr:5000
and runs but in does not listen to http://superhost.gr:80 which is being
managed by Apache.
and
Server URL : http://localhost:8000/
Server Root : /tmp/mod_wsgi-localhost:8000:1021
Server Conf : /tmp/mod_wsgi-localhost:8000:1021/httpd.conf
Error Log File : /tmp/mod_wsgi-localhost:8000:1021/error_log (warn)
Request Capacity : 5 (1 process * 5 threads)
Request Timeout : 60 (seconds)
Startup Timeout : 15 (seconds)
Queue Backlog : 100 (connections)
Queue Timeout : 45 (seconds)
Server Capacity : 20 (event/worker), 20 (prefork)
Server Backlog : 500 (connections)
Locale Setting : en_US.UTF-8
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:8000
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:8000
no listening sockets available, shutting down
AH00015: Unable to open logs
All i want to do is wehn my flask webapp.py run is intead of being run by the development server on port 5000 to be run by Aapche on port 80.
I dont know why epxress module mentiones port 8000 .....
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Graham Dumpleton
2018-08-30 10:09:02 UTC
Permalink
Which is possibly because your home directory /home/nikos is not accessible to the Apache user, or SELinux prevents Apache from hosting files from there.

It is usually a better idea to place the project under a directory such as /var/www/projects.

What do you get when you run:

ls -lasd /home/nikos

Graham
ok, i have un-installed python36u-mod_wsgi and just installes yum install mod_wsgi
then i used the configuration i mentioned in my 1st post and i still get this error whn i http://superhost.gr <http://superhost.gr/>
Forbidden: You don't have permission to access / on this server.
Why Apache since i have configured it correctly wont take over ?
Then only way i cna see my webpage is only if i http://superhost.gr <http://superhost.gr/>:5000
I need the latter to send data on Apache's port 80. Why isnt this happening?
A few things.
https://pypi.org/project/mod_wsgi/ <https://pypi.org/project/mod_wsgi/>
The second is that mod_wsgi-express is showing an error that something is already using port 8000, so you can't use that port either.
Finally, if you are installing 'python36u-mod_wsgi.x86_64' you shouldn't even need to install mod_wsgi-express separately as you have. Just configure your main Apache to host your WSGI application using mod_wsgi and don't use mod_wsgi-express.
See the Flask docs for an example. You will be using a different system mod_wsgi package is all.
Hello the flask vevelopmnet web server listens on http://superhost.gr:5000 <http://superhost.gr:5000/> and runs but in does not listen to http://superhost.gr:80 <http://superhost.gr/> which is being managed by Apache.
and
Server URL : http://localhost:8000/ <http://localhost:8000/>
Server Root : /tmp/mod_wsgi-localhost:8000:1021
Server Conf : /tmp/mod_wsgi-localhost:8000:1021/httpd.conf
Error Log File : /tmp/mod_wsgi-localhost:8000:1021/error_log (warn)
Request Capacity : 5 (1 process * 5 threads)
Request Timeout : 60 (seconds)
Startup Timeout : 15 (seconds)
Queue Backlog : 100 (connections)
Queue Timeout : 45 (seconds)
Server Capacity : 20 (event/worker), 20 (prefork)
Server Backlog : 500 (connections)
Locale Setting : en_US.UTF-8
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:8000
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:8000 <http://0.0.0.0:8000/>
no listening sockets available, shutting down
AH00015: Unable to open logs
All i want to do is wehn my flask webapp.py run is intead of being run by the development server on port 5000 to be run by Aapche on port 80.
I dont know why epxress module mentiones port 8000 .....
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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/qUrloVGZRDA/unsubscribe <https://groups.google.com/d/topic/modwsgi/qUrloVGZRDA/unsubscribe>.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Νίκος @ SuperHost
2018-08-30 10:25:10 UTC
Permalink
[***@superhost public_html]$ ls -lasd /home/nikos
4 drwxr-x--- 15 nikos nikos 4096 Aug 30 13:10 /home/nikos

Yes, because i was moving from another webhost company there some
lines with groups inside httpd.conf starting with Suexec that i
removed by hand now 5 mins ago.

Perhaps SuLinux prevtns accessing to /home/nikos. How can i entirely disable it?


Στις ΠέΌ, 30 Αυγ 2018 στις 1:09 ÎŒ.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
Which is possibly because your home directory /home/nikos is not
accessible to the Apache user, or SELinux prevents Apache from hosting
files from there.
It is usually a better idea to place the project under a directory such as
/var/www/projects.
ls -lasd /home/nikos
Graham
ok, i have un-installed python36u-mod_wsgi and just installes yum install mod_wsgi
then i used the configuration i mentioned in my 1st post and i still get
this error whn i http://superhost.gr
Forbidden: You don't have permission to access / on this server.
Why Apache since i have configured it correctly wont take over ?
Then only way i cna see my webpage is only if i http://superhost.gr:5000
I need the latter to send data on Apache's port 80. Why isnt this happening?
Στις ΠέΌ, 30 Αυγ 2018 στις 12:34 ÎŒ.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
A few things.
The first is that mod_wsgi-express is intended for running a distinct
Apache instance to you main Apache instance. It mentions port 8000 because
that is the port it will use by default. So it isn't modifying your main
Apache installation and you can't take over port 80 when using it unless
you disable your main Apache instance and then do various configuration to
https://pypi.org/project/mod_wsgi/
The second is that mod_wsgi-express is showing an error that something is
already using port 8000, so you can't use that port either.
Finally, if you are installing 'python36u-mod_wsgi.x86_64' you shouldn't
even need to install mod_wsgi-express separately as you have. Just
configure your main Apache to host your WSGI application using mod_wsgi and
don't use mod_wsgi-express.
See the Flask docs for an example. You will be using a different system
mod_wsgi package is all.
Hello the flask vevelopmnet web server listens on
http://superhost.gr:5000 and runs but in does not listen to
http://superhost.gr:80 <http://superhost.gr/> which is being managed by
Apache.
and
Server URL : http://localhost:8000/
Server Root : /tmp/mod_wsgi-localhost:8000:1021
Server Conf : /tmp/mod_wsgi-localhost:8000:1021/httpd.conf
Error Log File : /tmp/mod_wsgi-localhost:8000:1021/error_log (warn)
Request Capacity : 5 (1 process * 5 threads)
Request Timeout : 60 (seconds)
Startup Timeout : 15 (seconds)
Queue Backlog : 100 (connections)
Queue Timeout : 45 (seconds)
Server Capacity : 20 (event/worker), 20 (prefork)
Server Backlog : 500 (connections)
Locale Setting : en_US.UTF-8
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:8000
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:8000
no listening sockets available, shutting down
AH00015: Unable to open logs
All i want to do is wehn my flask webapp.py run is intead of being run by the development server on port 5000 to be run by Aapche on port 80.
I dont know why epxress module mentiones port 8000 .....
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Graham Dumpleton
2018-08-30 10:42:28 UTC
Permalink
It is not SELinux, it is because Apache can't see inside of your home directory.

Your home directory is: drwxr-x---

This means other users can't see into it, including Apache.

Try going:

chmod o+rx /home/nikos

and see if it makes a difference.

Graham
Post by Νίκος @ SuperHost
4 drwxr-x--- 15 nikos nikos 4096 Aug 30 13:10 /home/nikos
Yes, because i was moving from another webhost company there some lines with groups inside httpd.conf starting with Suexec that i removed by hand now 5 mins ago.
Perhaps SuLinux prevtns accessing to /home/nikos. How can i entirely disable it?
Which is possibly because your home directory /home/nikos is not accessible to the Apache user, or SELinux prevents Apache from hosting files from there.
It is usually a better idea to place the project under a directory such as /var/www/projects.
ls -lasd /home/nikos
Graham
ok, i have un-installed python36u-mod_wsgi and just installes yum install mod_wsgi
then i used the configuration i mentioned in my 1st post and i still get this error whn i http://superhost.gr <http://superhost.gr/>
Forbidden: You don't have permission to access / on this server.
Why Apache since i have configured it correctly wont take over ?
Then only way i cna see my webpage is only if i http://superhost.gr <http://superhost.gr/>:5000
I need the latter to send data on Apache's port 80. Why isnt this happening?
A few things.
https://pypi.org/project/mod_wsgi/ <https://pypi.org/project/mod_wsgi/>
The second is that mod_wsgi-express is showing an error that something is already using port 8000, so you can't use that port either.
Finally, if you are installing 'python36u-mod_wsgi.x86_64' you shouldn't even need to install mod_wsgi-express separately as you have. Just configure your main Apache to host your WSGI application using mod_wsgi and don't use mod_wsgi-express.
See the Flask docs for an example. You will be using a different system mod_wsgi package is all.
Hello the flask vevelopmnet web server listens on http://superhost.gr:5000 <http://superhost.gr:5000/> and runs but in does not listen to http://superhost.gr:80 <http://superhost.gr/> which is being managed by Apache.
and
Server URL : http://localhost:8000/ <http://localhost:8000/>
Server Root : /tmp/mod_wsgi-localhost:8000:1021
Server Conf : /tmp/mod_wsgi-localhost:8000:1021/httpd.conf
Error Log File : /tmp/mod_wsgi-localhost:8000:1021/error_log (warn)
Request Capacity : 5 (1 process * 5 threads)
Request Timeout : 60 (seconds)
Startup Timeout : 15 (seconds)
Queue Backlog : 100 (connections)
Queue Timeout : 45 (seconds)
Server Capacity : 20 (event/worker), 20 (prefork)
Server Backlog : 500 (connections)
Locale Setting : en_US.UTF-8
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:8000
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:8000 <http://0.0.0.0:8000/>
no listening sockets available, shutting down
AH00015: Unable to open logs
All i want to do is wehn my flask webapp.py run is intead of being run by the development server on port 5000 to be run by Aapche on port 80.
I dont know why epxress module mentiones port 8000 .....
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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/qUrloVGZRDA/unsubscribe <https://groups.google.com/d/topic/modwsgi/qUrloVGZRDA/unsubscribe>.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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/qUrloVGZRDA/unsubscribe <https://groups.google.com/d/topic/modwsgi/qUrloVGZRDA/unsubscribe>.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Νίκος @ SuperHost
2018-08-30 10:51:30 UTC
Permalink
After:

[***@superhost public_html]# ls -lasd ../
4 drwxr-xr-x 15 nikos nikos 4096 Aug 30 13:10 ../

Still:

Forbidden

You don't have permission to access / on this server.

Στις ΠέΌ, 30 Αυγ 2018 στις 1:42 ÎŒ.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
It is not SELinux, it is because Apache can't see inside of your home directory.
Your home directory is: drwxr-x---
This means other users can't see into it, including Apache.
chmod o+rx /home/nikos
and see if it makes a difference.
Graham
4 drwxr-x--- 15 nikos nikos 4096 Aug 30 13:10 /home/nikos
Yes, because i was moving from another webhost company there some lines with groups inside httpd.conf starting with Suexec that i removed by hand now 5 mins ago.
Perhaps SuLinux prevtns accessing to /home/nikos. How can i entirely disable it?
Στις ΠέΌ, 30 Αυγ 2018 στις 1:09 ÎŒ.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
Which is possibly because your home directory /home/nikos is not
accessible to the Apache user, or SELinux prevents Apache from hosting
files from there.
It is usually a better idea to place the project under a directory such
as /var/www/projects.
ls -lasd /home/nikos
Graham
ok, i have un-installed python36u-mod_wsgi and just installes yum install mod_wsgi
then i used the configuration i mentioned in my 1st post and i still get
this error whn i http://superhost.gr
Forbidden: You don't have permission to access / on this server.
Why Apache since i have configured it correctly wont take over ?
Then only way i cna see my webpage is only if i http://superhost.gr:5000
I need the latter to send data on Apache's port 80. Why isnt this happening?
Στις ΠέΌ, 30 Αυγ 2018 στις 12:34 ÎŒ.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
A few things.
The first is that mod_wsgi-express is intended for running a distinct
Apache instance to you main Apache instance. It mentions port 8000 because
that is the port it will use by default. So it isn't modifying your main
Apache installation and you can't take over port 80 when using it unless
you disable your main Apache instance and then do various configuration to
https://pypi.org/project/mod_wsgi/
The second is that mod_wsgi-express is showing an error that something
is already using port 8000, so you can't use that port either.
Finally, if you are installing 'python36u-mod_wsgi.x86_64' you shouldn't
even need to install mod_wsgi-express separately as you have. Just
configure your main Apache to host your WSGI application using mod_wsgi and
don't use mod_wsgi-express.
See the Flask docs for an example. You will be using a different system
mod_wsgi package is all.
Hello the flask vevelopmnet web server listens on
http://superhost.gr:5000 and runs but in does not listen to
http://superhost.gr:80 <http://superhost.gr/> which is being managed
by Apache.
and
Server URL : http://localhost:8000/
Server Root : /tmp/mod_wsgi-localhost:8000:1021
Server Conf : /tmp/mod_wsgi-localhost:8000:1021/httpd.conf
Error Log File : /tmp/mod_wsgi-localhost:8000:1021/error_log (warn)
Request Capacity : 5 (1 process * 5 threads)
Request Timeout : 60 (seconds)
Startup Timeout : 15 (seconds)
Queue Backlog : 100 (connections)
Queue Timeout : 45 (seconds)
Server Capacity : 20 (event/worker), 20 (prefork)
Server Backlog : 500 (connections)
Locale Setting : en_US.UTF-8
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:8000
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:8000
no listening sockets available, shutting down
AH00015: Unable to open logs
All i want to do is wehn my flask webapp.py run is intead of being run by the development server on port 5000 to be run by Aapche on port 80.
I dont know why epxress module mentiones port 8000 .....
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Graham Dumpleton
2018-08-30 10:54:28 UTC
Permalink
You should not totally disable SELinux, especially if you don't understand what it is for.

You can temporarily disable it to see if that is the issue. See:

https://www.tecmint.com/disable-selinux-temporarily-permanently-in-centos-rhel-fedora/ <https://www.tecmint.com/disable-selinux-temporarily-permanently-in-centos-rhel-fedora/>

What permissions though are all the other directories in the path down to the WSGI script file. They all need to be accessible to Apache, as does the WSGI script file.
Post by Νίκος @ SuperHost
4 drwxr-xr-x 15 nikos nikos 4096 Aug 30 13:10 ../
Forbidden
You don't have permission to access / on this server.
It is not SELinux, it is because Apache can't see inside of your home directory.
Your home directory is: drwxr-x---
This means other users can't see into it, including Apache.
chmod o+rx /home/nikos
and see if it makes a difference.
Graham
Post by Νίκος @ SuperHost
4 drwxr-x--- 15 nikos nikos 4096 Aug 30 13:10 /home/nikos
Yes, because i was moving from another webhost company there some lines with groups inside httpd.conf starting with Suexec that i removed by hand now 5 mins ago.
Perhaps SuLinux prevtns accessing to /home/nikos. How can i entirely disable it?
Which is possibly because your home directory /home/nikos is not accessible to the Apache user, or SELinux prevents Apache from hosting files from there.
It is usually a better idea to place the project under a directory such as /var/www/projects.
ls -lasd /home/nikos
Graham
ok, i have un-installed python36u-mod_wsgi and just installes yum install mod_wsgi
then i used the configuration i mentioned in my 1st post and i still get this error whn i http://superhost.gr <http://superhost.gr/>
Forbidden: You don't have permission to access / on this server.
Why Apache since i have configured it correctly wont take over ?
Then only way i cna see my webpage is only if i http://superhost.gr <http://superhost.gr/>:5000
I need the latter to send data on Apache's port 80. Why isnt this happening?
A few things.
https://pypi.org/project/mod_wsgi/ <https://pypi.org/project/mod_wsgi/>
The second is that mod_wsgi-express is showing an error that something is already using port 8000, so you can't use that port either.
Finally, if you are installing 'python36u-mod_wsgi.x86_64' you shouldn't even need to install mod_wsgi-express separately as you have. Just configure your main Apache to host your WSGI application using mod_wsgi and don't use mod_wsgi-express.
See the Flask docs for an example. You will be using a different system mod_wsgi package is all.
Hello the flask vevelopmnet web server listens on http://superhost.gr:5000 <http://superhost.gr:5000/> and runs but in does not listen to http://superhost.gr:80 <http://superhost.gr/> which is being managed by Apache.
and
Server URL : http://localhost:8000/ <http://localhost:8000/>
Server Root : /tmp/mod_wsgi-localhost:8000:1021
Server Conf : /tmp/mod_wsgi-localhost:8000:1021/httpd.conf
Error Log File : /tmp/mod_wsgi-localhost:8000:1021/error_log (warn)
Request Capacity : 5 (1 process * 5 threads)
Request Timeout : 60 (seconds)
Startup Timeout : 15 (seconds)
Queue Backlog : 100 (connections)
Queue Timeout : 45 (seconds)
Server Capacity : 20 (event/worker), 20 (prefork)
Server Backlog : 500 (connections)
Locale Setting : en_US.UTF-8
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:8000
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:8000 <http://0.0.0.0:8000/>
no listening sockets available, shutting down
AH00015: Unable to open logs
All i want to do is wehn my flask webapp.py run is intead of being run by the development server on port 5000 to be run by Aapche on port 80.
I dont know why epxress module mentiones port 8000 .....
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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/qUrloVGZRDA/unsubscribe <https://groups.google.com/d/topic/modwsgi/qUrloVGZRDA/unsubscribe>.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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/qUrloVGZRDA/unsubscribe <https://groups.google.com/d/topic/modwsgi/qUrloVGZRDA/unsubscribe>.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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/qUrloVGZRDA/unsubscribe <https://groups.google.com/d/topic/modwsgi/qUrloVGZRDA/unsubscribe>.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Νίκος @ SuperHost
2018-08-30 11:08:35 UTC
Permalink
[***@superhost public_html]# ls -lasd /home/nikos
4 drwxr-xr-x 15 nikos nikos 4096 Aug 30 13:10 /home/nikos

[***@superhost public_html]# ls -lasd /home/nikos/public_html/
4 drwxr-xr-x 7 nikos nikos 4096 Aug 30 12:34 /home/nikos/public_html/

[***@superhost public_html]# ll webapp.py
-rwxr-xr-x 1 nikos nikos 13681 Aug 30 13:46 webapp.py
[***@superhost public_html]#


Στις ΠέΌ, 30 Αυγ 2018 στις 1:54 ÎŒ.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
You should not totally disable SELinux, especially if you don't understand what it is for.
https://www.tecmint.com/disable-selinux-temporarily-permanently-in-centos-rhel-fedora/
What permissions though are all the other directories in the path down to
the WSGI script file. They all need to be accessible to Apache, as does the
WSGI script file.
4 drwxr-xr-x 15 nikos nikos 4096 Aug 30 13:10 ../
Forbidden
You don't have permission to access / on this server.
Στις ΠέΌ, 30 Αυγ 2018 στις 1:42 ÎŒ.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
It is not SELinux, it is because Apache can't see inside of your home directory.
Your home directory is: drwxr-x---
This means other users can't see into it, including Apache.
chmod o+rx /home/nikos
and see if it makes a difference.
Graham
4 drwxr-x--- 15 nikos nikos 4096 Aug 30 13:10 /home/nikos
Yes, because i was moving from another webhost company there some lines with groups inside httpd.conf starting with Suexec that i removed by hand now 5 mins ago.
Perhaps SuLinux prevtns accessing to /home/nikos. How can i entirely disable it?
Στις ΠέΌ, 30 Αυγ 2018 στις 1:09 ÎŒ.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
Which is possibly because your home directory /home/nikos is not
accessible to the Apache user, or SELinux prevents Apache from hosting
files from there.
It is usually a better idea to place the project under a directory such
as /var/www/projects.
ls -lasd /home/nikos
Graham
ok, i have un-installed python36u-mod_wsgi and just installes yum install mod_wsgi
then i used the configuration i mentioned in my 1st post and i still get
this error whn i http://superhost.gr
Forbidden: You don't have permission to access / on this server.
Why Apache since i have configured it correctly wont take over ?
Then only way i cna see my webpage is only if i http://superhost.gr:5000
I need the latter to send data on Apache's port 80. Why isnt this happening?
Στις ΠέΌ, 30 Αυγ 2018 στις 12:34 ÎŒ.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
A few things.
The first is that mod_wsgi-express is intended for running a distinct
Apache instance to you main Apache instance. It mentions port 8000 because
that is the port it will use by default. So it isn't modifying your main
Apache installation and you can't take over port 80 when using it unless
you disable your main Apache instance and then do various configuration to
https://pypi.org/project/mod_wsgi/
The second is that mod_wsgi-express is showing an error that something
is already using port 8000, so you can't use that port either.
Finally, if you are installing 'python36u-mod_wsgi.x86_64' you
shouldn't even need to install mod_wsgi-express separately as you have.
Just configure your main Apache to host your WSGI application using
mod_wsgi and don't use mod_wsgi-express.
See the Flask docs for an example. You will be using a different system
mod_wsgi package is all.
Hello the flask vevelopmnet web server listens on
http://superhost.gr:5000 and runs but in does not listen to
http://superhost.gr:80 <http://superhost.gr/> which is being managed
by Apache.
and
Server URL : http://localhost:8000/
Server Root : /tmp/mod_wsgi-localhost:8000:1021
Server Conf : /tmp/mod_wsgi-localhost:8000:1021/httpd.conf
Error Log File : /tmp/mod_wsgi-localhost:8000:1021/error_log (warn)
Request Capacity : 5 (1 process * 5 threads)
Request Timeout : 60 (seconds)
Startup Timeout : 15 (seconds)
Queue Backlog : 100 (connections)
Queue Timeout : 45 (seconds)
Server Capacity : 20 (event/worker), 20 (prefork)
Server Backlog : 500 (connections)
Locale Setting : en_US.UTF-8
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:8000
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:8000
no listening sockets available, shutting down
AH00015: Unable to open logs
All i want to do is wehn my flask webapp.py run is intead of being run by the development server on port 5000 to be run by Aapche on port 80.
I dont know why epxress module mentiones port 8000 .....
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Νίκος Βέργος
2018-08-30 11:29:06 UTC
Permalink
ok have disabled it and rerun apache

[***@superhost public_html]# sestatus
SELinux status: disabled

Still iam presenting the same error.

SELinux is disabled and paths and wsgi permisssions are 755 and still the
wsgi app won't run.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Graham Dumpleton
2018-08-30 11:51:58 UTC
Permalink
Did you fully stop and restart Apache in case doesn't pick up change in state of SELinux.

Also, can you try putting it under '/var/www/project'?

That is under where Apache normally expects stuff to be.
Post by Νίκος Βέργος
ok have disabled it and rerun apache
SELinux status: disabled
Still iam presenting the same error.
SELinux is disabled and paths and wsgi permisssions are 755 and still the wsgi app won't run.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Graham Dumpleton
2018-08-30 11:59:52 UTC
Permalink
Also, do you still have:

ProxyPass / http://superhost.gr:5000/
ProxyPassReverse / http://superhost:5000/

in the config. You shouldn't as that would try and proxy all your traffic through to the Flask development server instance.

Graham
Post by Graham Dumpleton
Did you fully stop and restart Apache in case doesn't pick up change in state of SELinux.
Also, can you try putting it under '/var/www/project'?
That is under where Apache normally expects stuff to be.
Post by Νίκος Βέργος
ok have disabled it and rerun apache
SELinux status: disabled
Still iam presenting the same error.
SELinux is disabled and paths and wsgi permisssions are 755 and still the wsgi app won't run.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Νίκος @ SuperHost
2018-08-30 12:07:11 UTC
Permalink
OK, ill remove that too.
Would it be any good if it were enabled?

Στις ΠέΌ, 30 Αυγ 2018 στις 2:59 ÎŒ.ÎŒ., ο/η Graham Dumpleton <
Post by n***@gmail.com
ProxyPass / http://superhost.gr:5000/
ProxyPassReverse / http://superhost:5000/
in the config. You shouldn't as that would try and proxy all your traffic
through to the Flask development server instance.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Νίκος Βέργος
2018-08-30 12:16:38 UTC
Permalink
Here is the updated httpd-vhosts.conf
I habe reanmes project/ to flask_app

<VirtualHost *:80>
ServerName superhost.gr
ServerAdmin ***@superhost.gr

DocumentRoot /var/www/flask_app
AddHandler wsgi-script .wsgi .py

WSGIDaemonProcess flask_app user=root group=root processes=1 threads=5
WSGIScriptAlias /flask_app /var/www/flask_app/webapp.py


<Directory /var/www/flask_app>
WSGIProcessGroup flask_app
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On

Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI

AllowOverride None
Require all granted
</Directory>


ErrorLog /home/nikos/public_html/logs/error.log
CustomLog /home/nikos/public_html/logs/requests.log combined
</VirtualHost>


Still Forbidden.

Should the user be nikos or root? and the ownership of the files? or perhaps Apache?


΀η ΠέΌπτη, 30 Αυγούστου 2018 - 2:59:59 ÎŒ.ÎŒ. UTC+3, ο χρήστης Graham
Post by n***@gmail.com
ProxyPass / http://superhost.gr:5000/
ProxyPassReverse / http://superhost:5000/
in the config. You shouldn't as that would try and proxy all your traffic
through to the Flask development server instance.
Graham
Did you fully stop and restart Apache in case doesn't pick up change in state of SELinux.
Also, can you try putting it under '/var/www/project'?
That is under where Apache normally expects stuff to be.
ok have disabled it and rerun apache
SELinux status: disabled
Still iam presenting the same error.
SELinux is disabled and paths and wsgi permisssions are 755 and still the
wsgi app won't run.
--
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
.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Graham Dumpleton
2018-08-30 12:27:39 UTC
Permalink
You are using:

http://superhost.gr/flask_app <http://superhost.gr/flask_app>

aren't you?

You can't use:

http://superhost.gr <http://superhost.gr/>

because you have set the mount point for the application as:

/flask_app

in the WSGIScriptAlias.

Another thing you should not have in there is:

DocumentRoot /var/www/flask_app

You should never set DocumentRoot to be a parent directory of your source code.

As it is, someone could likely use:

http://superhost.gr/webapp.py

which would try and execute that file when you don't want that, or they could even download your source code.

So don't set DocumentRoot. Also don't put in:

AddHandler wsgi-script .wsgi .py

That isn't needed and could cause other complications in some cases.

Graham
Post by Νίκος Βέργος
Here is the updated httpd-vhosts.conf
I habe reanmes project/ to flask_app
<VirtualHost *:80>
ServerName superhost.gr
DocumentRoot /var/www/flask_app
AddHandler wsgi-script .wsgi .py
WSGIDaemonProcess flask_app user=root group=root processes=1 threads=5
WSGIScriptAlias /flask_app /var/www/flask_app/webapp.py
<Directory /var/www/flask_app>
WSGIProcessGroup flask_app
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
AllowOverride None
Require all granted
</Directory>
ErrorLog /home/nikos/public_html/logs/error.log
CustomLog /home/nikos/public_html/logs/requests.log combined
</VirtualHost>
Still Forbidden.
Should the user be nikos or root? and the ownership of the files? or perhaps Apache?
ProxyPass / http://superhost.gr:5000/ <http://superhost.gr:5000/>
ProxyPassReverse / http://superhost:5000/ <http://superhost:5000/>
in the config. You shouldn't as that would try and proxy all your traffic through to the Flask development server instance.
Graham
Post by Graham Dumpleton
Did you fully stop and restart Apache in case doesn't pick up change in state of SELinux.
Also, can you try putting it under '/var/www/project'?
That is under where Apache normally expects stuff to be.
Post by Νίκος Βέργος
ok have disabled it and rerun apache
SELinux status: disabled
Still iam presenting the same error.
SELinux is disabled and paths and wsgi permisssions are 755 and still the wsgi app won't run.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Νίκος @ SuperHost
2018-08-30 12:44:16 UTC
Permalink
I have corrected all the error you mentioned to me and thank you for doing
so.

Still iam gettign the usual forbidden error.

Another weird thing which will reveal something iimagine is that although
i have renames my script from webapp.py to some_name.py

http://superhost.gr/webapp.py still displayes the code, and thankfully it
wont run.

But my wsgi script still wont run.

Στις ΠέΌ, 30 Αυγ 2018 στις 3:27 ÎŒ.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
http://superhost.gr/flask_app
aren't you?
http://superhost.gr
/flask_app
in the WSGIScriptAlias.
DocumentRoot /var/www/flask_app
You should never set DocumentRoot to be a parent directory of your source code.
http://superhost.gr/webapp.py
which would try and execute that file when you don't want that, or they
could even download your source code.
AddHandler wsgi-script .wsgi .py
That isn't needed and could cause other complications in some cases.
Graham
Here is the updated httpd-vhosts.conf
I habe reanmes project/ to flask_app
<VirtualHost *:80>
ServerName superhost.gr
DocumentRoot /var/www/flask_app
AddHandler wsgi-script .wsgi .py
WSGIDaemonProcess flask_app user=root group=root processes=1 threads=5
WSGIScriptAlias /flask_app /var/www/flask_app/webapp.py
<Directory /var/www/flask_app>
WSGIProcessGroup flask_app
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
AllowOverride None
Require all granted
</Directory>
ErrorLog /home/nikos/public_html/logs/error.log
CustomLog /home/nikos/public_html/logs/requests.log combined
</VirtualHost>
Still Forbidden.
Should the user be nikos or root? and the ownership of the files? or perhaps Apache?
΀η ΠέΌπτη, 30 Αυγούστου 2018 - 2:59:59 ÎŒ.ÎŒ. UTC+3, ο χρήστης Graham
Post by n***@gmail.com
ProxyPass / http://superhost.gr:5000/
ProxyPassReverse / http://superhost:5000/
in the config. You shouldn't as that would try and proxy all your traffic
through to the Flask development server instance.
Graham
Did you fully stop and restart Apache in case doesn't pick up change in state of SELinux.
Also, can you try putting it under '/var/www/project'?
That is under where Apache normally expects stuff to be.
ok have disabled it and rerun apache
SELinux status: disabled
Still iam presenting the same error.
SELinux is disabled and paths and wsgi permisssions are 755 and still the
wsgi app won't run.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Νίκος Βέργος
2018-08-30 12:47:37 UTC
Permalink
Here is when i try to run it.

Does it matter because iam under root? Does it have to be 'nikos' user?


[***@superhost flask_app]# pwd
/var/www/flask_app

[***@superhost flask_app]# python3 somename.py
* Serving Flask app "somename" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: on
* Running on http://superhost.gr:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 196-393-755


΀η ΠέΌπτη, 30 Αυγούστου 2018 - 3:27:48 ÎŒ.ÎŒ. UTC+3, ο χρήστης Graham
Post by Graham Dumpleton
http://superhost.gr/flask_app
aren't you?
http://superhost.gr
/flask_app
in the WSGIScriptAlias.
DocumentRoot /var/www/flask_app
You should never set DocumentRoot to be a parent directory of your source code.
http://superhost.gr/webapp.py
which would try and execute that file when you don't want that, or they
could even download your source code.
AddHandler wsgi-script .wsgi .py
That isn't needed and could cause other complications in some cases.
Graham
Here is the updated httpd-vhosts.conf
I habe reanmes project/ to flask_app
<VirtualHost *:80>
ServerName superhost.gr
DocumentRoot /var/www/flask_app
AddHandler wsgi-script .wsgi .py
WSGIDaemonProcess flask_app user=root group=root processes=1 threads=5
WSGIScriptAlias /flask_app /var/www/flask_app/webapp.py
<Directory /var/www/flask_app>
WSGIProcessGroup flask_app
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
AllowOverride None
Require all granted
</Directory>
ErrorLog /home/nikos/public_html/logs/error.log
CustomLog /home/nikos/public_html/logs/requests.log combined
</VirtualHost>
Still Forbidden.
Should the user be nikos or root? and the ownership of the files? or perhaps Apache?
΀η ΠέΌπτη, 30 Αυγούστου 2018 - 2:59:59 ÎŒ.ÎŒ. UTC+3, ο χρήστης Graham
Post by n***@gmail.com
ProxyPass / http://superhost.gr:5000/
ProxyPassReverse / http://superhost:5000/
in the config. You shouldn't as that would try and proxy all your traffic
through to the Flask development server instance.
Graham
Did you fully stop and restart Apache in case doesn't pick up change in state of SELinux.
Also, can you try putting it under '/var/www/project'?
That is under where Apache normally expects stuff to be.
ok have disabled it and rerun apache
SELinux status: disabled
Still iam presenting the same error.
SELinux is disabled and paths and wsgi permisssions are 755 and still the
wsgi app won't run.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Graham Dumpleton
2018-08-31 04:16:51 UTC
Permalink
You shouldn't be running 'python3 somename.py' at same time. That has nothing to do with running it under Apache/mod_wsgi.

What is the current Apache configuration you are using, and what URL are you using in the web browser?

Graham
Post by Νίκος Βέργος
Here is when i try to run it.
Does it matter because iam under root? Does it have to be 'nikos' user?
/var/www/flask_app
* Serving Flask app "somename" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: on
* Running on http://superhost.gr:5000/ <http://superhost.gr:5000/> (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 196-393-755
http://superhost.gr/flask_app <http://superhost.gr/flask_app>
aren't you?
http://superhost.gr <http://superhost.gr/>
/flask_app
in the WSGIScriptAlias.
DocumentRoot /var/www/flask_app
You should never set DocumentRoot to be a parent directory of your source code.
http://superhost.gr/webapp.py <http://superhost.gr/webapp.py>
which would try and execute that file when you don't want that, or they could even download your source code.
AddHandler wsgi-script .wsgi .py
That isn't needed and could cause other complications in some cases.
Graham
Post by Νίκος Βέργος
Here is the updated httpd-vhosts.conf
I habe reanmes project/ to flask_app
<VirtualHost *:80>
ServerName superhost.gr <http://superhost.gr/>
DocumentRoot /var/www/flask_app
AddHandler wsgi-script .wsgi .py
WSGIDaemonProcess flask_app user=root group=root processes=1 threads=5
WSGIScriptAlias /flask_app /var/www/flask_app/webapp.py
<Directory /var/www/flask_app>
WSGIProcessGroup flask_app
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
AllowOverride None
Require all granted
</Directory>
ErrorLog /home/nikos/public_html/logs/error.log
CustomLog /home/nikos/public_html/logs/requests.log combined
</VirtualHost>
Still Forbidden.
Should the user be nikos or root? and the ownership of the files? or perhaps Apache?
ProxyPass / http://superhost.gr:5000/ <http://superhost.gr:5000/>
ProxyPassReverse / http://superhost:5000/ <http://superhost:5000/>
in the config. You shouldn't as that would try and proxy all your traffic through to the Flask development server instance.
Graham
Post by Graham Dumpleton
Did you fully stop and restart Apache in case doesn't pick up change in state of SELinux.
Also, can you try putting it under '/var/www/project'?
That is under where Apache normally expects stuff to be.
Post by Νίκος Βέργος
ok have disabled it and rerun apache
SELinux status: disabled
Still iam presenting the same error.
SELinux is disabled and paths and wsgi permisssions are 755 and still the wsgi app won't run.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Νίκος @ SuperHost
2018-08-31 08:27:46 UTC
Permalink
I thought python3 some_name.py was used to start the wsgi process for the
Apache to take over no?

httpd.conf => https://pastebin.com/LWTiPMkD

Accessing at as => http://superhost.gr/ gives forbidden while only works
as http://superhost.gr:5000

Στις Παρ, 31 Αυγ 2018 στις 7:17 π.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
You shouldn't be running 'python3 somename.py' at same time. That has
nothing to do with running it under Apache/mod_wsgi.
What is the current Apache configuration you are using, and what URL are
you using in the web browser?
Graham
Here is when i try to run it.
Does it matter because iam under root? Does it have to be 'nikos' user?
/var/www/flask_app
* Serving Flask app "somename" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: on
* Running on http://superhost.gr:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 196-393-755
΀η ΠέΌπτη, 30 Αυγούστου 2018 - 3:27:48 ÎŒ.ÎŒ. UTC+3, ο χρήστης Graham
Post by Graham Dumpleton
http://superhost.gr/flask_app
aren't you?
http://superhost.gr
/flask_app
in the WSGIScriptAlias.
DocumentRoot /var/www/flask_app
You should never set DocumentRoot to be a parent directory of your source code.
http://superhost.gr/webapp.py
which would try and execute that file when you don't want that, or they
could even download your source code.
AddHandler wsgi-script .wsgi .py
That isn't needed and could cause other complications in some cases.
Graham
Here is the updated httpd-vhosts.conf
I habe reanmes project/ to flask_app
<VirtualHost *:80>
ServerName superhost.gr
DocumentRoot /var/www/flask_app
AddHandler wsgi-script .wsgi .py
WSGIDaemonProcess flask_app user=root group=root processes=1 threads=5
WSGIScriptAlias /flask_app /var/www/flask_app/webapp.py
<Directory /var/www/flask_app>
WSGIProcessGroup flask_app
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
AllowOverride None
Require all granted
</Directory>
ErrorLog /home/nikos/public_html/logs/error.log
CustomLog /home/nikos/public_html/logs/requests.log combined
</VirtualHost>
Still Forbidden.
Should the user be nikos or root? and the ownership of the files? or perhaps Apache?
΀η ΠέΌπτη, 30 Αυγούστου 2018 - 2:59:59 ÎŒ.ÎŒ. UTC+3, ο χρήστης Graham
Post by n***@gmail.com
ProxyPass / http://superhost.gr:5000/
ProxyPassReverse / http://superhost:5000/
in the config. You shouldn't as that would try and proxy all your
traffic through to the Flask development server instance.
Graham
Did you fully stop and restart Apache in case doesn't pick up change in
state of SELinux.
Also, can you try putting it under '/var/www/project'?
That is under where Apache normally expects stuff to be.
ok have disabled it and rerun apache
SELinux status: disabled
Still iam presenting the same error.
SELinux is disabled and paths and wsgi permisssions are 755 and still
the wsgi app won't run.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Graham Dumpleton
2018-08-31 08:42:01 UTC
Permalink
I thought python3 some_name.py was used to start the wsgi process for the Apache to take over no?
No. Is a completely separate instance.
httpd.conf => https://pastebin.com/LWTiPMkD <https://pastebin.com/LWTiPMkD>
Not your main Apache configuration, just the virtual host file with mod_wsgi set up for application
Accessing at as => http://superhost.gr/ <http://superhost.gr/> gives forbidden while only works as http://superhost.gr:5000 <http://superhost.gr:5000/>
As I said before, because you are using:

WSGIScriptAlias /flask_app /var/www/flask_app/webapp.py

where the WSGI application is mounted at /flask_app, you must use as URL:

http://superhost.gr/flask_app <http://superhost.gr/flask_app>

If you want it to be hosted at the root of the site, use:

WSGIScriptAlias / /var/www/flask_app/webapp.py

Graham
You shouldn't be running 'python3 somename.py' at same time. That has nothing to do with running it under Apache/mod_wsgi.
What is the current Apache configuration you are using, and what URL are you using in the web browser?
Graham
Post by Νίκος Βέργος
Here is when i try to run it.
Does it matter because iam under root? Does it have to be 'nikos' user?
/var/www/flask_app
* Serving Flask app "somename" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: on
* Running on http://superhost.gr:5000/ <http://superhost.gr:5000/> (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 196-393-755
http://superhost.gr/flask_app <http://superhost.gr/flask_app>
aren't you?
http://superhost.gr <http://superhost.gr/>
/flask_app
in the WSGIScriptAlias.
DocumentRoot /var/www/flask_app
You should never set DocumentRoot to be a parent directory of your source code.
http://superhost.gr/webapp.py <http://superhost.gr/webapp.py>
which would try and execute that file when you don't want that, or they could even download your source code.
AddHandler wsgi-script .wsgi .py
That isn't needed and could cause other complications in some cases.
Graham
Post by Νίκος Βέργος
Here is the updated httpd-vhosts.conf
I habe reanmes project/ to flask_app
<VirtualHost *:80>
ServerName superhost.gr <http://superhost.gr/>
DocumentRoot /var/www/flask_app
AddHandler wsgi-script .wsgi .py
WSGIDaemonProcess flask_app user=root group=root processes=1 threads=5
WSGIScriptAlias /flask_app /var/www/flask_app/webapp.py
<Directory /var/www/flask_app>
WSGIProcessGroup flask_app
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
AllowOverride None
Require all granted
</Directory>
ErrorLog /home/nikos/public_html/logs/error.log
CustomLog /home/nikos/public_html/logs/requests.log combined
</VirtualHost>
Still Forbidden.
Should the user be nikos or root? and the ownership of the files? or perhaps Apache?
ProxyPass / http://superhost.gr:5000/ <http://superhost.gr:5000/>
ProxyPassReverse / http://superhost:5000/ <http://superhost:5000/>
in the config. You shouldn't as that would try and proxy all your traffic through to the Flask development server instance.
Graham
Post by Graham Dumpleton
Did you fully stop and restart Apache in case doesn't pick up change in state of SELinux.
Also, can you try putting it under '/var/www/project'?
That is under where Apache normally expects stuff to be.
Post by Νίκος Βέργος
ok have disabled it and rerun apache
SELinux status: disabled
Still iam presenting the same error.
SELinux is disabled and paths and wsgi permisssions are 755 and still the wsgi app won't run.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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/qUrloVGZRDA/unsubscribe <https://groups.google.com/d/topic/modwsgi/qUrloVGZRDA/unsubscribe>.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Νίκος @ SuperHost
2018-08-31 08:55:21 UTC
Permalink
Ah i forgot to mention that because on /var/www/ we had the same forbidden
error i took the site back to nikos public. Here:

<VirtualHost *:80>
ServerName superhost.gr
ServerAdmin ***@superhost.gr

WSGIDaemonProcess public_html user=nikos group=nikos processes=1
threads=5
WSGIScriptAlias / /home/nikos/public_html/some_page.py


<Directory /home/nikos/public_html>
WSGIProcessGroup public_html
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On

Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI

AllowOverride None
Require all granted
</Directory>


ErrorLog /home/nikos/public_html/logs/error.log
CustomLog /home/nikos/public_html/logs/requests.log combined
</VirtualHost>

Στις Παρ, 31 Αυγ 2018 στις 11:42 π.ÎŒ., ο/η Graham Dumpleton <
Post by Νίκος @ SuperHost
I thought python3 some_name.py was used to start the wsgi process for the
Apache to take over no?
No. Is a completely separate instance.
httpd.conf => https://pastebin.com/LWTiPMkD
Not your main Apache configuration, just the virtual host file with
mod_wsgi set up for application
Accessing at as => http://superhost.gr/ gives forbidden while only
works as http://superhost.gr:5000
WSGIScriptAlias /flask_app /var/www/flask_app/webapp.py
http://superhost.gr/flask_app
WSGIScriptAlias / /var/www/flask_app/webapp.py
Graham
Στις Παρ, 31 Αυγ 2018 στις 7:17 π.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
You shouldn't be running 'python3 somename.py' at same time. That has
nothing to do with running it under Apache/mod_wsgi.
What is the current Apache configuration you are using, and what URL are
you using in the web browser?
Graham
Here is when i try to run it.
Does it matter because iam under root? Does it have to be 'nikos' user?
/var/www/flask_app
* Serving Flask app "somename" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: on
* Running on http://superhost.gr:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 196-393-755
΀η ΠέΌπτη, 30 Αυγούστου 2018 - 3:27:48 ÎŒ.ÎŒ. UTC+3, ο χρήστης Graham
Post by Graham Dumpleton
http://superhost.gr/flask_app
aren't you?
http://superhost.gr
/flask_app
in the WSGIScriptAlias.
DocumentRoot /var/www/flask_app
You should never set DocumentRoot to be a parent directory of your source code.
http://superhost.gr/webapp.py
which would try and execute that file when you don't want that, or they
could even download your source code.
AddHandler wsgi-script .wsgi .py
That isn't needed and could cause other complications in some cases.
Graham
Here is the updated httpd-vhosts.conf
I habe reanmes project/ to flask_app
<VirtualHost *:80>
ServerName superhost.gr
DocumentRoot /var/www/flask_app
AddHandler wsgi-script .wsgi .py
WSGIDaemonProcess flask_app user=root group=root processes=1 threads=5
WSGIScriptAlias /flask_app /var/www/flask_app/webapp.py
<Directory /var/www/flask_app>
WSGIProcessGroup flask_app
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
AllowOverride None
Require all granted
</Directory>
ErrorLog /home/nikos/public_html/logs/error.log
CustomLog /home/nikos/public_html/logs/requests.log combined
</VirtualHost>
Still Forbidden.
Should the user be nikos or root? and the ownership of the files? or perhaps Apache?
΀η ΠέΌπτη, 30 Αυγούστου 2018 - 2:59:59 ÎŒ.ÎŒ. UTC+3, ο χρήστης Graham
Post by n***@gmail.com
ProxyPass / http://superhost.gr:5000/
ProxyPassReverse / http://superhost:5000/
in the config. You shouldn't as that would try and proxy all your
traffic through to the Flask development server instance.
Graham
Did you fully stop and restart Apache in case doesn't pick up change in
state of SELinux.
Also, can you try putting it under '/var/www/project'?
That is under where Apache normally expects stuff to be.
ok have disabled it and rerun apache
SELinux status: disabled
Still iam presenting the same error.
SELinux is disabled and paths and wsgi permisssions are 755 and still
the wsgi app won't run.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Graham Dumpleton
2018-08-31 09:35:05 UTC
Permalink
What other VirtualHost definitions do you have which use the same ServerName value of 'superhost.gr'?
Post by n***@gmail.com
<VirtualHost *:80>
ServerName superhost.gr <http://superhost.gr/>
WSGIDaemonProcess public_html user=nikos group=nikos processes=1 threads=5
WSGIScriptAlias / /home/nikos/public_html/some_page.py
<Directory /home/nikos/public_html>
WSGIProcessGroup public_html
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
AllowOverride None
Require all granted
</Directory>
ErrorLog /home/nikos/public_html/logs/error.log
CustomLog /home/nikos/public_html/logs/requests.log combined
</VirtualHost>
I thought python3 some_name.py was used to start the wsgi process for the Apache to take over no?
No. Is a completely separate instance.
httpd.conf => https://pastebin.com/LWTiPMkD <https://pastebin.com/LWTiPMkD>
Not your main Apache configuration, just the virtual host file with mod_wsgi set up for application
Accessing at as => http://superhost.gr/ <http://superhost.gr/> gives forbidden while only works as http://superhost.gr:5000 <http://superhost.gr:5000/>
WSGIScriptAlias /flask_app /var/www/flask_app/webapp.py
http://superhost.gr/flask_app <http://superhost.gr/flask_app>
WSGIScriptAlias / /var/www/flask_app/webapp.py
Graham
You shouldn't be running 'python3 somename.py' at same time. That has nothing to do with running it under Apache/mod_wsgi.
What is the current Apache configuration you are using, and what URL are you using in the web browser?
Graham
Post by Νίκος Βέργος
Here is when i try to run it.
Does it matter because iam under root? Does it have to be 'nikos' user?
/var/www/flask_app
* Serving Flask app "somename" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: on
* Running on http://superhost.gr:5000/ <http://superhost.gr:5000/> (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 196-393-755
http://superhost.gr/flask_app <http://superhost.gr/flask_app>
aren't you?
http://superhost.gr <http://superhost.gr/>
/flask_app
in the WSGIScriptAlias.
DocumentRoot /var/www/flask_app
You should never set DocumentRoot to be a parent directory of your source code.
http://superhost.gr/webapp.py <http://superhost.gr/webapp.py>
which would try and execute that file when you don't want that, or they could even download your source code.
AddHandler wsgi-script .wsgi .py
That isn't needed and could cause other complications in some cases.
Graham
Post by Νίκος Βέργος
Here is the updated httpd-vhosts.conf
I habe reanmes project/ to flask_app
<VirtualHost *:80>
ServerName superhost.gr <http://superhost.gr/>
DocumentRoot /var/www/flask_app
AddHandler wsgi-script .wsgi .py
WSGIDaemonProcess flask_app user=root group=root processes=1 threads=5
WSGIScriptAlias /flask_app /var/www/flask_app/webapp.py
<Directory /var/www/flask_app>
WSGIProcessGroup flask_app
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
AllowOverride None
Require all granted
</Directory>
ErrorLog /home/nikos/public_html/logs/error.log
CustomLog /home/nikos/public_html/logs/requests.log combined
</VirtualHost>
Still Forbidden.
Should the user be nikos or root? and the ownership of the files? or perhaps Apache?
ProxyPass / http://superhost.gr:5000/ <http://superhost.gr:5000/>
ProxyPassReverse / http://superhost:5000/ <http://superhost:5000/>
in the config. You shouldn't as that would try and proxy all your traffic through to the Flask development server instance.
Graham
Post by Graham Dumpleton
Did you fully stop and restart Apache in case doesn't pick up change in state of SELinux.
Also, can you try putting it under '/var/www/project'?
That is under where Apache normally expects stuff to be.
Post by Νίκος Βέργος
ok have disabled it and rerun apache
SELinux status: disabled
Still iam presenting the same error.
SELinux is disabled and paths and wsgi permisssions are 755 and still the wsgi app won't run.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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/qUrloVGZRDA/unsubscribe <https://groups.google.com/d/topic/modwsgi/qUrloVGZRDA/unsubscribe>.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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/qUrloVGZRDA/unsubscribe <https://groups.google.com/d/topic/modwsgi/qUrloVGZRDA/unsubscribe>.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Νίκος Βέργος
2018-08-31 12:01:36 UTC
Permalink
I have no other vosts file except the part on the httpd.conf file:


1. <VirtualHost 176.223.129.220:80 [fe80::21c:42ff:fe91:a981]:80>
2. ServerName superhost.gr
3. ServerAlias www.superhost.gr
4. ServerAlias webmail.superhost.gr
5. ServerAlias admin.superhost.gr
6. ServerAlias autoconfig.superhost.gr
7. ServerAlias autodiscover.superhost.gr
8. DocumentRoot /home/nikos/public_html
9. ErrorLog /var/log/virtualmin/superhost.gr_error_log
10. CustomLog /var/log/virtualmin/superhost.gr_access_log combined
11. ScriptAlias /cgi-bin/ /home/nikos/cgi-bin/
12. ScriptAlias /AutoDiscover/AutoDiscover.xml
/home/nikos/cgi-bin/autoconfig.cgi
13. ScriptAlias /Autodiscover/Autodiscover.xml
/home/nikos/cgi-bin/autoconfig.cgi
14. ScriptAlias /autodiscover/autodiscover.xml
/home/nikos/cgi-bin/autoconfig.cgi
15. DirectoryIndex index.html index.htm index.php index.php4 index.php5
16.
17.
18. <Directory /home/nikos/public_html>
19. Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
20. allow from all
21. AllowOverride All
Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
22. Require all granted
23. </Directory>
24.
25.
26. <Directory /home/nikos/cgi-bin>
27. allow from all
28. AllowOverride All
Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
29. Require all granted
30. </Directory>
31.
32.
33. RewriteEngine on
34. RewriteCond %{HTTP_HOST} =webmail.superhost.gr
35. RewriteRule ^(.*) https://superhost.gr:20000/ [R]
36. RewriteCond %{HTTP_HOST} =admin.superhost.gr
37. RewriteRule ^(.*) https://superhost.gr:10000/ [R]
38. RemoveHandler .php
39. RemoveHandler .php7.2
40. php_admin_value engine Off
41. Alias /dav /home/nikos/public_html
42. <Location /dav>
43. DAV on
44. AuthType Basic
45. AuthName "superhost.gr"
46. AuthUserFile /home/nikos/etc/dav.digest.passwd
47. Require valid-user
48. ForceType text/plain
49. Satisfy All
50. RemoveHandler .php
51. RemoveHandler .php7.2
52. RewriteEngine off
53. </Location>
54. Redirect /mail/config-v1.1.xml /cgi-bin/autoconfig.cgi
55. Redirect /.well-known/autoconfig/mail/config-v1.1.xml
/cgi-bin/autoconfig.cgi
56. php_value memory_limit 32M
57. <FilesMatch \.php$>
58. SetHandler proxy:fcgi://localhost:8004
59. </FilesMatch>
60. </VirtualHost>


΀η Παρασκευή, 31 Αυγούστου 2018 - 12:35:15 ÎŒ.ÎŒ. UTC+3, ο χρήστης Graham
Post by Graham Dumpleton
What other VirtualHost definitions do you have which use the same
ServerName value of 'superhost.gr'?
Ah i forgot to mention that because on /var/www/ we had the same forbidden
<VirtualHost *:80>
ServerName superhost.gr
WSGIDaemonProcess public_html user=nikos group=nikos processes=1 threads=5
WSGIScriptAlias / /home/nikos/public_html/some_page.py
<Directory /home/nikos/public_html>
WSGIProcessGroup public_html
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
AllowOverride None
Require all granted
</Directory>
ErrorLog /home/nikos/public_html/logs/error.log
CustomLog /home/nikos/public_html/logs/requests.log combined
</VirtualHost>
Στις Παρ, 31 Αυγ 2018 στις 11:42 π.ÎŒ., ο/η Graham Dumpleton <
Post by Νίκος @ SuperHost
I thought python3 some_name.py was used to start the wsgi process for the
Apache to take over no?
No. Is a completely separate instance.
httpd.conf => https://pastebin.com/LWTiPMkD
Not your main Apache configuration, just the virtual host file with
mod_wsgi set up for application
Accessing at as => http://superhost.gr/ gives forbidden while only
works as http://superhost.gr:5000
WSGIScriptAlias /flask_app /var/www/flask_app/webapp.py
http://superhost.gr/flask_app
WSGIScriptAlias / /var/www/flask_app/webapp.py
Graham
Στις Παρ, 31 Αυγ 2018 στις 7:17 π.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
You shouldn't be running 'python3 somename.py' at same time. That has
nothing to do with running it under Apache/mod_wsgi.
What is the current Apache configuration you are using, and what URL are
you using in the web browser?
Graham
Here is when i try to run it.
Does it matter because iam under root? Does it have to be 'nikos' user?
/var/www/flask_app
* Serving Flask app "somename" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: on
* Running on http://superhost.gr:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 196-393-755
΀η ΠέΌπτη, 30 Αυγούστου 2018 - 3:27:48 ÎŒ.ÎŒ. UTC+3, ο χρήστης Graham
Post by Graham Dumpleton
http://superhost.gr/flask_app
aren't you?
http://superhost.gr
/flask_app
in the WSGIScriptAlias.
DocumentRoot /var/www/flask_app
You should never set DocumentRoot to be a parent directory of your source code.
http://superhost.gr/webapp.py
which would try and execute that file when you don't want that, or they
could even download your source code.
AddHandler wsgi-script .wsgi .py
That isn't needed and could cause other complications in some cases.
Graham
Here is the updated httpd-vhosts.conf
I habe reanmes project/ to flask_app
<VirtualHost *:80>
ServerName superhost.gr
DocumentRoot /var/www/flask_app
AddHandler wsgi-script .wsgi .py
WSGIDaemonProcess flask_app user=root group=root processes=1 threads=5
WSGIScriptAlias /flask_app /var/www/flask_app/webapp.py
<Directory /var/www/flask_app>
WSGIProcessGroup flask_app
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
AllowOverride None
Require all granted
</Directory>
ErrorLog /home/nikos/public_html/logs/error.log
CustomLog /home/nikos/public_html/logs/requests.log combined
</VirtualHost>
Still Forbidden.
Should the user be nikos or root? and the ownership of the files? or perhaps Apache?
΀η ΠέΌπτη, 30 Αυγούστου 2018 - 2:59:59 ÎŒ.ÎŒ. UTC+3, ο χρήστης Graham
Post by n***@gmail.com
ProxyPass / http://superhost.gr:5000/
ProxyPassReverse / http://superhost:5000/
in the config. You shouldn't as that would try and proxy all your
traffic through to the Flask development server instance.
Graham
Did you fully stop and restart Apache in case doesn't pick up change
in state of SELinux.
Also, can you try putting it under '/var/www/project'?
That is under where Apache normally expects stuff to be.
ok have disabled it and rerun apache
SELinux status: disabled
Still iam presenting the same error.
SELinux is disabled and paths and wsgi permisssions are 755 and still
the wsgi app won't run.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
<javascript:>.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
<javascript:>.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
<javascript:>.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
<javascript:>.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Νίκος Βέργος
2018-08-31 14:40:43 UTC
Permalink
Also i want to show you this structure in case it helps. Perhpas php7.2
and cgi-bin gives us trouble?
[***@superhost nikos]# ll
total 140
lrwxrwxrwx 1 root root 32 Aug 18 01:37 cgi-bin -> /home/nikos/public_html/cgi-bin/
drwxr-xr-x 5 nikos nikos 4096 Aug 30 19:17 etc
drwxr-xr-x 2 nikos nikos 4096 May 21 09:28 fcgi-bin
drwxr-xr-x 2 nikos nikos 4096 May 19 20:58 homes
drwxr-x--- 2 nikos nikos 4096 Aug 18 01:34 logs
drwx------ 9 nikos nikos 4096 Aug 29 13:24 Maildir
drwxr-xr-x 7 nikos nikos 4096 Aug 31 14:50 public_html
-rwxr-xr-x 1 nikos nikos 1647 Aug 21 12:40 ssl.ca
-rwx------ 1 nikos nikos 2264 Aug 21 12:40 ssl.cert
-rwx------ 1 nikos nikos 3911 Aug 21 12:40 ssl.combined
-rwx------ 1 nikos nikos 5586 Aug 21 12:40 ssl.everything
-rwx------ 1 nikos nikos 1675 Aug 21 12:40 ssl.key
drwxr-x--- 2 nikos nikos 86016 Aug 31 13:34 tmp
drwx------ 2 nikos nikos 4096 Aug 18 01:34 virtualmin-backup
[***@superhost nikos]# ll cgi-bin/
total 4
-rwxr-xr-x 1 nikos nikos 231 Aug 29 17:54 php7.2.cgi
[***@superhost nikos]#
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Νίκος @ SuperHost
2018-08-31 09:58:29 UTC
Permalink
I have no other vhosts files just the following directives within httpd.conf


1. <VirtualHost 176.223.129.220:80 [fe80::21c:42ff:fe91:a981]:80>
2. ServerName superhost.gr
3. ServerAlias www.superhost.gr
4. ServerAlias webmail.superhost.gr
5. ServerAlias admin.superhost.gr
6. ServerAlias autoconfig.superhost.gr
7. ServerAlias autodiscover.superhost.gr
8. DocumentRoot /home/nikos/public_html
9. ErrorLog /var/log/virtualmin/superhost.gr_error_log
10. CustomLog /var/log/virtualmin/superhost.gr_access_log combined
11. ScriptAlias /cgi-bin/ /home/nikos/cgi-bin/
12. ScriptAlias /AutoDiscover/AutoDiscover.xml
/home/nikos/cgi-bin/autoconfig.cgi
13. ScriptAlias /Autodiscover/Autodiscover.xml
/home/nikos/cgi-bin/autoconfig.cgi
14. ScriptAlias /autodiscover/autodiscover.xml
/home/nikos/cgi-bin/autoconfig.cgi
15. DirectoryIndex index.html index.htm index.php index.php4 index.php5
16.
17.
18. <Directory /home/nikos/public_html>
19. Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
20. allow from all
21. AllowOverride All
Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
22. Require all granted
23. </Directory>
24.
25.
26. <Directory /home/nikos/cgi-bin>
27. allow from all
28. AllowOverride All
Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
29. Require all granted
30. </Directory>
31.
32.
33. RewriteEngine on
34. RewriteCond %{HTTP_HOST} =webmail.superhost.gr
35. RewriteRule ^(.*) https://superhost.gr:20000/ [R]
36. RewriteCond %{HTTP_HOST} =admin.superhost.gr
37. RewriteRule ^(.*) https://superhost.gr:10000/ [R]
38. RemoveHandler .php
39. RemoveHandler .php7.2
40. php_admin_value engine Off
41. Alias /dav /home/nikos/public_html
42. <Location /dav>
43. DAV on
44. AuthType Basic
45. AuthName "superhost.gr"
46. AuthUserFile /home/nikos/etc/dav.digest.passwd
47. Require valid-user
48. ForceType text/plain
49. Satisfy All
50. RemoveHandler .php
51. RemoveHandler .php7.2
52. RewriteEngine off
53. </Location>
54. Redirect /mail/config-v1.1.xml /cgi-bin/autoconfig.cgi
55. Redirect /.well-known/autoconfig/mail/config-v1.1.xml
/cgi-bin/autoconfig.cgi
56. php_value memory_limit 32M
57. <FilesMatch \.php$>
58. SetHandler proxy:fcgi://localhost:8004
59. </FilesMatch>
60. </VirtualHost>


Στις Παρ, 31 Αυγ 2018 στις 12:35 ÎŒ.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
What other VirtualHost definitions do you have which use the same
ServerName value of 'superhost.gr'?
Ah i forgot to mention that because on /var/www/ we had the same forbidden
<VirtualHost *:80>
ServerName superhost.gr
WSGIDaemonProcess public_html user=nikos group=nikos processes=1 threads=5
WSGIScriptAlias / /home/nikos/public_html/some_page.py
<Directory /home/nikos/public_html>
WSGIProcessGroup public_html
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
AllowOverride None
Require all granted
</Directory>
ErrorLog /home/nikos/public_html/logs/error.log
CustomLog /home/nikos/public_html/logs/requests.log combined
</VirtualHost>
Στις Παρ, 31 Αυγ 2018 στις 11:42 π.ÎŒ., ο/η Graham Dumpleton <
Post by Νίκος @ SuperHost
I thought python3 some_name.py was used to start the wsgi process for the
Apache to take over no?
No. Is a completely separate instance.
httpd.conf => https://pastebin.com/LWTiPMkD
Not your main Apache configuration, just the virtual host file with
mod_wsgi set up for application
Accessing at as => http://superhost.gr/ gives forbidden while only
works as http://superhost.gr:5000
WSGIScriptAlias /flask_app /var/www/flask_app/webapp.py
http://superhost.gr/flask_app
WSGIScriptAlias / /var/www/flask_app/webapp.py
Graham
Στις Παρ, 31 Αυγ 2018 στις 7:17 π.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
You shouldn't be running 'python3 somename.py' at same time. That has
nothing to do with running it under Apache/mod_wsgi.
What is the current Apache configuration you are using, and what URL are
you using in the web browser?
Graham
Here is when i try to run it.
Does it matter because iam under root? Does it have to be 'nikos' user?
/var/www/flask_app
* Serving Flask app "somename" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: on
* Running on http://superhost.gr:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 196-393-755
΀η ΠέΌπτη, 30 Αυγούστου 2018 - 3:27:48 ÎŒ.ÎŒ. UTC+3, ο χρήστης Graham
Post by Graham Dumpleton
http://superhost.gr/flask_app
aren't you?
http://superhost.gr
/flask_app
in the WSGIScriptAlias.
DocumentRoot /var/www/flask_app
You should never set DocumentRoot to be a parent directory of your source code.
http://superhost.gr/webapp.py
which would try and execute that file when you don't want that, or they
could even download your source code.
AddHandler wsgi-script .wsgi .py
That isn't needed and could cause other complications in some cases.
Graham
Here is the updated httpd-vhosts.conf
I habe reanmes project/ to flask_app
<VirtualHost *:80>
ServerName superhost.gr
DocumentRoot /var/www/flask_app
AddHandler wsgi-script .wsgi .py
WSGIDaemonProcess flask_app user=root group=root processes=1 threads=5
WSGIScriptAlias /flask_app /var/www/flask_app/webapp.py
<Directory /var/www/flask_app>
WSGIProcessGroup flask_app
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
AllowOverride None
Require all granted
</Directory>
ErrorLog /home/nikos/public_html/logs/error.log
CustomLog /home/nikos/public_html/logs/requests.log combined
</VirtualHost>
Still Forbidden.
Should the user be nikos or root? and the ownership of the files? or perhaps Apache?
΀η ΠέΌπτη, 30 Αυγούστου 2018 - 2:59:59 ÎŒ.ÎŒ. UTC+3, ο χρήστης Graham
Post by n***@gmail.com
ProxyPass / http://superhost.gr:5000/
ProxyPassReverse / http://superhost:5000/
in the config. You shouldn't as that would try and proxy all your
traffic through to the Flask development server instance.
Graham
Did you fully stop and restart Apache in case doesn't pick up change
in state of SELinux.
Also, can you try putting it under '/var/www/project'?
That is under where Apache normally expects stuff to be.
ok have disabled it and rerun apache
SELinux status: disabled
Still iam presenting the same error.
SELinux is disabled and paths and wsgi permisssions are 755 and still
the wsgi app won't run.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Νίκος Βέργος
2018-09-01 07:03:32 UTC
Permalink
is it possbile a line like that is missing and should be appllied to
httpd-vhosts.conf ?

LoadModule wsgi_module modules/mod_wsgi.so


΀η Παρασκευή, 31 Αυγούστου 2018 - 12:35:15 ÎŒ.ÎŒ. UTC+3, ο χρήστης Graham
Post by Graham Dumpleton
What other VirtualHost definitions do you have which use the same
ServerName value of 'superhost.gr'?
Ah i forgot to mention that because on /var/www/ we had the same forbidden
<VirtualHost *:80>
ServerName superhost.gr
WSGIDaemonProcess public_html user=nikos group=nikos processes=1 threads=5
WSGIScriptAlias / /home/nikos/public_html/some_page.py
<Directory /home/nikos/public_html>
WSGIProcessGroup public_html
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
AllowOverride None
Require all granted
</Directory>
ErrorLog /home/nikos/public_html/logs/error.log
CustomLog /home/nikos/public_html/logs/requests.log combined
</VirtualHost>
Στις Παρ, 31 Αυγ 2018 στις 11:42 π.ÎŒ., ο/η Graham Dumpleton <
Post by Νίκος @ SuperHost
I thought python3 some_name.py was used to start the wsgi process for the
Apache to take over no?
No. Is a completely separate instance.
httpd.conf => https://pastebin.com/LWTiPMkD
Not your main Apache configuration, just the virtual host file with
mod_wsgi set up for application
Accessing at as => http://superhost.gr/ gives forbidden while only
works as http://superhost.gr:5000
WSGIScriptAlias /flask_app /var/www/flask_app/webapp.py
http://superhost.gr/flask_app
WSGIScriptAlias / /var/www/flask_app/webapp.py
Graham
Στις Παρ, 31 Αυγ 2018 στις 7:17 π.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
You shouldn't be running 'python3 somename.py' at same time. That has
nothing to do with running it under Apache/mod_wsgi.
What is the current Apache configuration you are using, and what URL are
you using in the web browser?
Graham
Here is when i try to run it.
Does it matter because iam under root? Does it have to be 'nikos' user?
/var/www/flask_app
* Serving Flask app "somename" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: on
* Running on http://superhost.gr:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 196-393-755
΀η ΠέΌπτη, 30 Αυγούστου 2018 - 3:27:48 ÎŒ.ÎŒ. UTC+3, ο χρήστης Graham
Post by Graham Dumpleton
http://superhost.gr/flask_app
aren't you?
http://superhost.gr
/flask_app
in the WSGIScriptAlias.
DocumentRoot /var/www/flask_app
You should never set DocumentRoot to be a parent directory of your source code.
http://superhost.gr/webapp.py
which would try and execute that file when you don't want that, or they
could even download your source code.
AddHandler wsgi-script .wsgi .py
That isn't needed and could cause other complications in some cases.
Graham
Here is the updated httpd-vhosts.conf
I habe reanmes project/ to flask_app
<VirtualHost *:80>
ServerName superhost.gr
DocumentRoot /var/www/flask_app
AddHandler wsgi-script .wsgi .py
WSGIDaemonProcess flask_app user=root group=root processes=1 threads=5
WSGIScriptAlias /flask_app /var/www/flask_app/webapp.py
<Directory /var/www/flask_app>
WSGIProcessGroup flask_app
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
AllowOverride None
Require all granted
</Directory>
ErrorLog /home/nikos/public_html/logs/error.log
CustomLog /home/nikos/public_html/logs/requests.log combined
</VirtualHost>
Still Forbidden.
Should the user be nikos or root? and the ownership of the files? or perhaps Apache?
΀η ΠέΌπτη, 30 Αυγούστου 2018 - 2:59:59 ÎŒ.ÎŒ. UTC+3, ο χρήστης Graham
Post by n***@gmail.com
ProxyPass / http://superhost.gr:5000/
ProxyPassReverse / http://superhost:5000/
in the config. You shouldn't as that would try and proxy all your
traffic through to the Flask development server instance.
Graham
Did you fully stop and restart Apache in case doesn't pick up change
in state of SELinux.
Also, can you try putting it under '/var/www/project'?
That is under where Apache normally expects stuff to be.
ok have disabled it and rerun apache
SELinux status: disabled
Still iam presenting the same error.
SELinux is disabled and paths and wsgi permisssions are 755 and still
the wsgi app won't run.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
<javascript:>.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
<javascript:>.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
<javascript:>.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
<javascript:>.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Νίκος Βέργος
2018-09-02 20:41:25 UTC
Permalink
Please tell me that we can resolve this. Its 4 days now and i still haven't
figured it out. I tried everything in my knowledge.

΀η Σάββατο, 1 ΣεπτεΌβρίου 2018 - 10:03:32 π.ÎŒ. UTC+3, ο χρήστης Νίκος
Post by Νίκος Βέργος
is it possbile a line like that is missing and should be appllied to
httpd-vhosts.conf ?
LoadModule wsgi_module modules/mod_wsgi.so
΀η Παρασκευή, 31 Αυγούστου 2018 - 12:35:15 ÎŒ.ÎŒ. UTC+3, ο χρήστης Graham
Post by Graham Dumpleton
What other VirtualHost definitions do you have which use the same
ServerName value of 'superhost.gr'?
Ah i forgot to mention that because on /var/www/ we had the same
<VirtualHost *:80>
ServerName superhost.gr
WSGIDaemonProcess public_html user=nikos group=nikos processes=1 threads=5
WSGIScriptAlias / /home/nikos/public_html/some_page.py
<Directory /home/nikos/public_html>
WSGIProcessGroup public_html
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
AllowOverride None
Require all granted
</Directory>
ErrorLog /home/nikos/public_html/logs/error.log
CustomLog /home/nikos/public_html/logs/requests.log combined
</VirtualHost>
Στις Παρ, 31 Αυγ 2018 στις 11:42 π.ÎŒ., ο/η Graham Dumpleton <
Post by Νίκος @ SuperHost
I thought python3 some_name.py was used to start the wsgi process for
the Apache to take over no?
No. Is a completely separate instance.
httpd.conf => https://pastebin.com/LWTiPMkD
Not your main Apache configuration, just the virtual host file with
mod_wsgi set up for application
Accessing at as => http://superhost.gr/ gives forbidden while only
works as http://superhost.gr:5000
WSGIScriptAlias /flask_app /var/www/flask_app/webapp.py
http://superhost.gr/flask_app
WSGIScriptAlias / /var/www/flask_app/webapp.py
Graham
Στις Παρ, 31 Αυγ 2018 στις 7:17 π.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
You shouldn't be running 'python3 somename.py' at same time. That has
nothing to do with running it under Apache/mod_wsgi.
What is the current Apache configuration you are using, and what URL
are you using in the web browser?
Graham
Here is when i try to run it.
Does it matter because iam under root? Does it have to be 'nikos' user?
/var/www/flask_app
* Serving Flask app "somename" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: on
* Running on http://superhost.gr:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 196-393-755
΀η ΠέΌπτη, 30 Αυγούστου 2018 - 3:27:48 ÎŒ.ÎŒ. UTC+3, ο χρήστης Graham
Post by Graham Dumpleton
http://superhost.gr/flask_app
aren't you?
http://superhost.gr
/flask_app
in the WSGIScriptAlias.
DocumentRoot /var/www/flask_app
You should never set DocumentRoot to be a parent directory of your source code.
http://superhost.gr/webapp.py
which would try and execute that file when you don't want that, or
they could even download your source code.
AddHandler wsgi-script .wsgi .py
That isn't needed and could cause other complications in some cases.
Graham
Here is the updated httpd-vhosts.conf
I habe reanmes project/ to flask_app
<VirtualHost *:80>
ServerName superhost.gr
DocumentRoot /var/www/flask_app
AddHandler wsgi-script .wsgi .py
WSGIDaemonProcess flask_app user=root group=root processes=1 threads=5
WSGIScriptAlias /flask_app /var/www/flask_app/webapp.py
<Directory /var/www/flask_app>
WSGIProcessGroup flask_app
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
AllowOverride None
Require all granted
</Directory>
ErrorLog /home/nikos/public_html/logs/error.log
CustomLog /home/nikos/public_html/logs/requests.log combined
</VirtualHost>
Still Forbidden.
Should the user be nikos or root? and the ownership of the files? or perhaps Apache?
΀η ΠέΌπτη, 30 Αυγούστου 2018 - 2:59:59 ÎŒ.ÎŒ. UTC+3, ο χρήστης Graham
Post by n***@gmail.com
ProxyPass / http://superhost.gr:5000/
ProxyPassReverse / http://superhost:5000/
in the config. You shouldn't as that would try and proxy all your
traffic through to the Flask development server instance.
Graham
Did you fully stop and restart Apache in case doesn't pick up change
in state of SELinux.
Also, can you try putting it under '/var/www/project'?
That is under where Apache normally expects stuff to be.
ok have disabled it and rerun apache
SELinux status: disabled
Still iam presenting the same error.
SELinux is disabled and paths and wsgi permisssions are 755 and still
the wsgi app won't run.
--
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,
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Graham Dumpleton
2018-09-03 00:31:58 UTC
Permalink
is it possbile a line like that is missing and should be appllied to httpd-vhosts.conf ?
LoadModule wsgi_module modules/mod_wsgi.so
If that was missing then Apache should have given an error as soon as it saw any WSGI directive.

If you have found you don't have that, then your virtual host site file mustn't even be looked at. If using Debian/Ubuntu, is the virtual host site file in the sites-available directory and then been enabled so it is symlinked in the sites-enabled directory? If using CentOS/Fedora, is the virtual host site file include in the main Apache configuration file?

Did you try the changes related to using a separate 'python.superhost.gr' host name?

Can you validate the virtual host site file is even being read, if it is a separate file, by adding a syntax error into it? Just add a new line in the VirtualHost of 'XXX'. That isn't obviously a valid directive and so should create an error when you restart or start Apache.

Graham
What other VirtualHost definitions do you have which use the same ServerName value of 'superhost.gr <http://superhost.gr/>'?
Post by n***@gmail.com
<VirtualHost *:80>
ServerName superhost.gr <http://superhost.gr/>
WSGIDaemonProcess public_html user=nikos group=nikos processes=1 threads=5
WSGIScriptAlias / /home/nikos/public_html/some_page.py
<Directory /home/nikos/public_html>
WSGIProcessGroup public_html
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
AllowOverride None
Require all granted
</Directory>
ErrorLog /home/nikos/public_html/logs/error.log
CustomLog /home/nikos/public_html/logs/requests.log combined
</VirtualHost>
I thought python3 some_name.py was used to start the wsgi process for the Apache to take over no?
No. Is a completely separate instance.
httpd.conf => https://pastebin.com/LWTiPMkD <https://pastebin.com/LWTiPMkD>
Not your main Apache configuration, just the virtual host file with mod_wsgi set up for application
Accessing at as => http://superhost.gr/ <http://superhost.gr/> gives forbidden while only works as http://superhost.gr:5000 <http://superhost.gr:5000/>
WSGIScriptAlias /flask_app /var/www/flask_app/webapp.py
http://superhost.gr/flask_app <http://superhost.gr/flask_app>
WSGIScriptAlias / /var/www/flask_app/webapp.py
Graham
You shouldn't be running 'python3 somename.py' at same time. That has nothing to do with running it under Apache/mod_wsgi.
What is the current Apache configuration you are using, and what URL are you using in the web browser?
Graham
Post by Νίκος Βέργος
Here is when i try to run it.
Does it matter because iam under root? Does it have to be 'nikos' user?
/var/www/flask_app
* Serving Flask app "somename" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: on
* Running on http://superhost.gr:5000/ <http://superhost.gr:5000/> (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 196-393-755
http://superhost.gr/flask_app <http://superhost.gr/flask_app>
aren't you?
http://superhost.gr <http://superhost.gr/>
/flask_app
in the WSGIScriptAlias.
DocumentRoot /var/www/flask_app
You should never set DocumentRoot to be a parent directory of your source code.
http://superhost.gr/webapp.py <http://superhost.gr/webapp.py>
which would try and execute that file when you don't want that, or they could even download your source code.
AddHandler wsgi-script .wsgi .py
That isn't needed and could cause other complications in some cases.
Graham
Post by Νίκος Βέργος
Here is the updated httpd-vhosts.conf
I habe reanmes project/ to flask_app
<VirtualHost *:80>
ServerName superhost.gr <http://superhost.gr/>
DocumentRoot /var/www/flask_app
AddHandler wsgi-script .wsgi .py
WSGIDaemonProcess flask_app user=root group=root processes=1 threads=5
WSGIScriptAlias /flask_app /var/www/flask_app/webapp.py
<Directory /var/www/flask_app>
WSGIProcessGroup flask_app
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
AllowOverride None
Require all granted
</Directory>
ErrorLog /home/nikos/public_html/logs/error.log
CustomLog /home/nikos/public_html/logs/requests.log combined
</VirtualHost>
Still Forbidden.
Should the user be nikos or root? and the ownership of the files? or perhaps Apache?
ProxyPass / http://superhost.gr:5000/ <http://superhost.gr:5000/>
ProxyPassReverse / http://superhost:5000/ <http://superhost:5000/>
in the config. You shouldn't as that would try and proxy all your traffic through to the Flask development server instance.
Graham
Post by Graham Dumpleton
Did you fully stop and restart Apache in case doesn't pick up change in state of SELinux.
Also, can you try putting it under '/var/www/project'?
That is under where Apache normally expects stuff to be.
Post by Νίκος Βέργος
ok have disabled it and rerun apache
SELinux status: disabled
Still iam presenting the same error.
SELinux is disabled and paths and wsgi permisssions are 755 and still the wsgi app won't run.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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/qUrloVGZRDA/unsubscribe <https://groups.google.com/d/topic/modwsgi/qUrloVGZRDA/unsubscribe>.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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/qUrloVGZRDA/unsubscribe <https://groups.google.com/d/topic/modwsgi/qUrloVGZRDA/unsubscribe>.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Νίκος Βέργος
2018-09-03 06:27:53 UTC
Permalink
Post by Graham Dumpleton
Can you validate the virtual host site file is even being read, if it is a
separate file, by adding a syntax error into it? Just add a new line in the
VirtualHost of 'XXX'. That isn't obviously a valid directive and so >should
create an error when you restart or start Apache.

Hello Graham,

I just added 'XXX' in '/etc/httpd/conf/httpd-vhosts.conf' and Apache
restarted without error. So, you are right it does NOT evan being read the
whole time! I'am using CemtOS by the way.
Post by Graham Dumpleton
If using CentOS/Fedora, is the virtual host site file include in the main
Apache configuration file?

I don't know. How can i check that Directive if is present? What's its name?
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Graham Dumpleton
2018-09-03 07:35:22 UTC
Permalink
Look for existing lines in main Apache configuration file of:

# Virtual hosts
#Include /private/etc/apache2/extra/httpd-vhosts.conf

The '#' is a comment character. Remove the '#' in front of the 'Include' line.

Graham
Post by Νίκος Βέργος
Can you validate the virtual host site file is even being read, if it is a separate file, by adding a syntax error into it? Just add a new line in the VirtualHost of 'XXX'. That isn't obviously a valid directive and so >should create an error when you restart or start Apache.
Hello Graham,
I just added 'XXX' in '/etc/httpd/conf/httpd-vhosts.conf' and Apache restarted without error. So, you are right it does NOT evan being read the whole time! I'am using CemtOS by the way.
If using CentOS/Fedora, is the virtual host site file include in the main Apache configuration file?
I don't know. How can i check that Directive if is present? What's its name?
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Νίκος @ SuperHost
2018-09-03 07:54:25 UTC
Permalink
I just checked, there arent present, Also you line seems to search for
Debian distro while iam using CentOS.

Στις Δευ, 3 Σεπ 2018 στις 10:35 π.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
# Virtual hosts
#Include /private/etc/apache2/extra/httpd-vhosts.conf
The '#' is a comment character. Remove the '#' in front of the 'Include' line.
Graham
Post by Graham Dumpleton
Can you validate the virtual host site file is even being read, if it is
a separate file, by adding a syntax error into it? Just add a new line in
the VirtualHost of 'XXX'. That isn't obviously a valid directive and so
Post by Graham Dumpleton
should create an error when you restart or start Apache.
Hello Graham,
I just added 'XXX' in '/etc/httpd/conf/httpd-vhosts.conf' and Apache
restarted without error. So, you are right it does NOT evan being read the
whole time! I'am using CemtOS by the way.
Post by Graham Dumpleton
If using CentOS/Fedora, is the virtual host site file include in the
main Apache configuration file?
I don't know. How can i check that Directive if is present? What's its name?
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Graham Dumpleton
2018-09-03 07:57:33 UTC
Permalink
The example is not Debian, it is from macOS.

Just add the 'Include' at the end of httpd.conf and give it the full path name to your file for your virtual host.

If you don't have a LoadModule line for wsgi_module, you will need to add it before including the file, or at the start of the virtual host file.

Graham
I just checked, there arent present, Also you line seems to search for Debian distro while iam using CentOS.
# Virtual hosts
#Include /private/etc/apache2/extra/httpd-vhosts.conf
The '#' is a comment character. Remove the '#' in front of the 'Include' line.
Graham
Post by Νίκος Βέργος
Can you validate the virtual host site file is even being read, if it is a separate file, by adding a syntax error into it? Just add a new line in the VirtualHost of 'XXX'. That isn't obviously a valid directive and so >should create an error when you restart or start Apache.
Hello Graham,
I just added 'XXX' in '/etc/httpd/conf/httpd-vhosts.conf' and Apache restarted without error. So, you are right it does NOT evan being read the whole time! I'am using CemtOS by the way.
If using CentOS/Fedora, is the virtual host site file include in the main Apache configuration file?
I don't know. How can i check that Directive if is present? What's its name?
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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/qUrloVGZRDA/unsubscribe <https://groups.google.com/d/topic/modwsgi/qUrloVGZRDA/unsubscribe>.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Νίκος @ SuperHost
2018-09-03 08:01:06 UTC
Permalink
LoadModule wsgi_module modules/mod_wsgi.so

Include /etc/httpd/conf/httpd-vhosts.conf

Iam using python36u-mod_wsgi though? is the loadmodule still the same?


Στις Δευ, 3 Σεπ 2018 στις 10:57 π.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
The example is not Debian, it is from macOS.
Just add the 'Include' at the end of httpd.conf and give it the full path
name to your file for your virtual host.
If you don't have a LoadModule line for wsgi_module, you will need to add
it before including the file, or at the start of the virtual host file.
Graham
I just checked, there arent present, Also you line seems to search for
Debian distro while iam using CentOS.
Στις Δευ, 3 Σεπ 2018 στις 10:35 π.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
# Virtual hosts
#Include /private/etc/apache2/extra/httpd-vhosts.conf
The '#' is a comment character. Remove the '#' in front of the 'Include' line.
Graham
Post by Graham Dumpleton
Can you validate the virtual host site file is even being read, if it is
a separate file, by adding a syntax error into it? Just add a new line in
the VirtualHost of 'XXX'. That isn't obviously a valid directive and so
Post by Graham Dumpleton
should create an error when you restart or start Apache.
Hello Graham,
I just added 'XXX' in '/etc/httpd/conf/httpd-vhosts.conf' and Apache
restarted without error. So, you are right it does NOT evan being read the
whole time! I'am using CemtOS by the way.
Post by Graham Dumpleton
If using CentOS/Fedora, is the virtual host site file include in the
main Apache configuration file?
I don't know. How can i check that Directive if is present? What's its name?
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Graham Dumpleton
2018-09-03 08:02:32 UTC
Permalink
I have no idea what the module file is called for that distro. Look in the Apache modules directory to confirm you have it and what it is called.
Post by Νίκος Βέργος
LoadModule wsgi_module modules/mod_wsgi.so
Include /etc/httpd/conf/httpd-vhosts.conf
Iam using python36u-mod_wsgi though? is the loadmodule still the same?
The example is not Debian, it is from macOS.
Just add the 'Include' at the end of httpd.conf and give it the full path name to your file for your virtual host.
If you don't have a LoadModule line for wsgi_module, you will need to add it before including the file, or at the start of the virtual host file.
Graham
I just checked, there arent present, Also you line seems to search for Debian distro while iam using CentOS.
# Virtual hosts
#Include /private/etc/apache2/extra/httpd-vhosts.conf
The '#' is a comment character. Remove the '#' in front of the 'Include' line.
Graham
Post by Νίκος Βέργος
Can you validate the virtual host site file is even being read, if it is a separate file, by adding a syntax error into it? Just add a new line in the VirtualHost of 'XXX'. That isn't obviously a valid directive and so >should create an error when you restart or start Apache.
Hello Graham,
I just added 'XXX' in '/etc/httpd/conf/httpd-vhosts.conf' and Apache restarted without error. So, you are right it does NOT evan being read the whole time! I'am using CemtOS by the way.
If using CentOS/Fedora, is the virtual host site file include in the main Apache configuration file?
I don't know. How can i check that Directive if is present? What's its name?
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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/qUrloVGZRDA/unsubscribe <https://groups.google.com/d/topic/modwsgi/qUrloVGZRDA/unsubscribe>.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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/qUrloVGZRDA/unsubscribe <https://groups.google.com/d/topic/modwsgi/qUrloVGZRDA/unsubscribe>.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
Visit this group at https://groups.google.com/group/modwsgi <https://groups.google.com/group/modwsgi>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Νίκος @ SuperHost
2018-09-03 08:03:43 UTC
Permalink
-- Unit httpd.service has begun starting up.
Sep 03 11:02:49 mail.superhost.gr httpd[16243]: httpd: Syntax error on
line 1 of /etc/httpd/conf/httpd.conf: Cannot load modules/mod_wsgi.so
into server: /etc/httpd/modules/mod_wsgi.so: cannot open shared object
file: No such file
Sep 03 11:02:49 mail.superhost.gr systemd[1]: httpd.service: main
process exited, code=exited, status=1/FAILURE
Sep 03 11:02:49 mail.superhost.gr kill[16245]: kill: cannot find process ""
Sep 03 11:02:49 mail.superhost.gr systemd[1]: httpd.service: control
process exited, code=exited status=1
Sep 03 11:02:49 mail.superhost.gr systemd[1]: Failed to start The
Apache HTTP Server.


Στις Δευ, 3 Σεπ 2018 στις 11:02 π.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
I have no idea what the module file is called for that distro. Look in the
Apache modules directory to confirm you have it and what it is called.
LoadModule wsgi_module modules/mod_wsgi.so
Include /etc/httpd/conf/httpd-vhosts.conf
Iam using python36u-mod_wsgi though? is the loadmodule still the same?
Στις Δευ, 3 Σεπ 2018 στις 10:57 π.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
The example is not Debian, it is from macOS.
Just add the 'Include' at the end of httpd.conf and give it the full path
name to your file for your virtual host.
If you don't have a LoadModule line for wsgi_module, you will need to add
it before including the file, or at the start of the virtual host file.
Graham
I just checked, there arent present, Also you line seems to search for
Debian distro while iam using CentOS.
Στις Δευ, 3 Σεπ 2018 στις 10:35 π.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
# Virtual hosts
#Include /private/etc/apache2/extra/httpd-vhosts.conf
The '#' is a comment character. Remove the '#' in front of the 'Include' line.
Graham
Post by Graham Dumpleton
Can you validate the virtual host site file is even being read, if it
is a separate file, by adding a syntax error into it? Just add a new line
in the VirtualHost of 'XXX'. That isn't obviously a valid directive and so
Post by Graham Dumpleton
should create an error when you restart or start Apache.
Hello Graham,
I just added 'XXX' in '/etc/httpd/conf/httpd-vhosts.conf' and Apache
restarted without error. So, you are right it does NOT evan being read the
whole time! I'am using CemtOS by the way.
Post by Graham Dumpleton
If using CentOS/Fedora, is the virtual host site file include in the
main Apache configuration file?
I don't know. How can i check that Directive if is present? What's its name?
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Νίκος @ SuperHost
2018-09-03 08:06:03 UTC
Permalink
i removed python36u-mod_wsgi and yum install mod_wsgi but iam still gettign
the same error.
Post by Νίκος @ SuperHost
-- Unit httpd.service has begun starting up.
Sep 03 11:02:49 mail.superhost.gr httpd[16243]: httpd: Syntax error on line 1 of /etc/httpd/conf/httpd.conf: Cannot load modules/mod_wsgi.so into server: /etc/httpd/modules/mod_wsgi.so: cannot open shared object file: No such file
Sep 03 11:02:49 mail.superhost.gr systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Sep 03 11:02:49 mail.superhost.gr kill[16245]: kill: cannot find process ""
Sep 03 11:02:49 mail.superhost.gr systemd[1]: httpd.service: control process exited, code=exited status=1
Sep 03 11:02:49 mail.superhost.gr systemd[1]: Failed to start The Apache HTTP Server.
Στις Δευ, 3 Σεπ 2018 στις 11:02 π.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
I have no idea what the module file is called for that distro. Look in
the Apache modules directory to confirm you have it and what it is called.
LoadModule wsgi_module modules/mod_wsgi.so
Include /etc/httpd/conf/httpd-vhosts.conf
Iam using python36u-mod_wsgi though? is the loadmodule still the same?
Στις Δευ, 3 Σεπ 2018 στις 10:57 π.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
The example is not Debian, it is from macOS.
Just add the 'Include' at the end of httpd.conf and give it the full
path name to your file for your virtual host.
If you don't have a LoadModule line for wsgi_module, you will need to
add it before including the file, or at the start of the virtual host file.
Graham
I just checked, there arent present, Also you line seems to search for
Debian distro while iam using CentOS.
Στις Δευ, 3 Σεπ 2018 στις 10:35 π.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
# Virtual hosts
#Include /private/etc/apache2/extra/httpd-vhosts.conf
The '#' is a comment character. Remove the '#' in front of the 'Include' line.
Graham
Post by Graham Dumpleton
Can you validate the virtual host site file is even being read, if it
is a separate file, by adding a syntax error into it? Just add a new line
in the VirtualHost of 'XXX'. That isn't obviously a valid directive and so
Post by Graham Dumpleton
should create an error when you restart or start Apache.
Hello Graham,
I just added 'XXX' in '/etc/httpd/conf/httpd-vhosts.conf' and Apache
restarted without error. So, you are right it does NOT evan being read the
whole time! I'am using CemtOS by the way.
Post by Graham Dumpleton
If using CentOS/Fedora, is the virtual host site file include in the
main Apache configuration file?
I don't know. How can i check that Directive if is present? What's its name?
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Νίκος @ SuperHost
2018-09-03 08:17:50 UTC
Permalink
i cant make it work please do help. i have install tha normal mod_wsgi but
still it provides an error.
Post by Νίκος @ SuperHost
i removed python36u-mod_wsgi and yum install mod_wsgi but iam still
gettign the same error.
Post by Νίκος @ SuperHost
-- Unit httpd.service has begun starting up.
Sep 03 11:02:49 mail.superhost.gr httpd[16243]: httpd: Syntax error on line 1 of /etc/httpd/conf/httpd.conf: Cannot load modules/mod_wsgi.so into server: /etc/httpd/modules/mod_wsgi.so: cannot open shared object file: No such file
Sep 03 11:02:49 mail.superhost.gr systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Sep 03 11:02:49 mail.superhost.gr kill[16245]: kill: cannot find process ""
Sep 03 11:02:49 mail.superhost.gr systemd[1]: httpd.service: control process exited, code=exited status=1
Sep 03 11:02:49 mail.superhost.gr systemd[1]: Failed to start The Apache HTTP Server.
Στις Δευ, 3 Σεπ 2018 στις 11:02 π.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
I have no idea what the module file is called for that distro. Look in
the Apache modules directory to confirm you have it and what it is called.
LoadModule wsgi_module modules/mod_wsgi.so
Include /etc/httpd/conf/httpd-vhosts.conf
Iam using python36u-mod_wsgi though? is the loadmodule still the same?
Στις Δευ, 3 Σεπ 2018 στις 10:57 π.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
The example is not Debian, it is from macOS.
Just add the 'Include' at the end of httpd.conf and give it the full
path name to your file for your virtual host.
If you don't have a LoadModule line for wsgi_module, you will need to
add it before including the file, or at the start of the virtual host file.
Graham
I just checked, there arent present, Also you line seems to search for
Debian distro while iam using CentOS.
Στις Δευ, 3 Σεπ 2018 στις 10:35 π.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
# Virtual hosts
#Include /private/etc/apache2/extra/httpd-vhosts.conf
The '#' is a comment character. Remove the '#' in front of the 'Include' line.
Graham
Post by Graham Dumpleton
Can you validate the virtual host site file is even being read, if it
is a separate file, by adding a syntax error into it? Just add a new line
in the VirtualHost of 'XXX'. That isn't obviously a valid directive and so
Post by Graham Dumpleton
should create an error when you restart or start Apache.
Hello Graham,
I just added 'XXX' in '/etc/httpd/conf/httpd-vhosts.conf' and Apache
restarted without error. So, you are right it does NOT evan being read the
whole time! I'am using CemtOS by the way.
Post by Graham Dumpleton
If using CentOS/Fedora, is the virtual host site file include in the
main Apache configuration file?
I don't know. How can i check that Directive if is present? What's its name?
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Νίκος Βέργος
2018-09-03 08:33:20 UTC
Permalink
Okey i managed to put correctly those 2 lines an put them on the top of
httpd.conf

LoadModule wsgi_module modules/mod_wsgi.so
Include /etc/httpd/conf/httpd-vhosts.conf


i restarted the web server and http://superhost.gr/

and then still the forbidden error :-((

΀η Δευτέρα, 3 ΣεπτεΌβρίου 2018 - 11:02:41 π.ÎŒ. UTC+3, ο χρήστης Graham
Post by Graham Dumpleton
I have no idea what the module file is called for that distro. Look in the
Apache modules directory to confirm you have it and what it is called.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Νίκος Βέργος
2018-09-03 21:12:27 UTC
Permalink
I Removed both mod_wsgi and python36u-mod_wsgi as well. I installed yum
install httpd-devel to get rid of the 'apsx' issue. Here is the results of
the express install.
mod mod_wsgi-express install-module
LoadModule wsgi_module "/usr/lib64/httpd/modules/mod_wsgi-py36.c
python-36m-x86_64-linux-gnu.so" WSGIPythonHome "/usr"
Do you make anyhting out of it as to why still cannot load my wsgi file?
I'm still getting the forbidden error.... :-(
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Νίκος @ SuperHost
2018-08-30 12:04:24 UTC
Permalink
Yes, i did server times restarting httpd.

( as root )
mkdir /var/ww/projects
cp -R static/ templates/ webapp.py /var/www/projects/

Still Forbidden !!

Στις ΠέΌ, 30 Αυγ 2018 στις 2:52 ÎŒ.ÎŒ., ο/η Graham Dumpleton <
Post by Graham Dumpleton
Did you fully stop and restart Apache in case doesn't pick up change in state of SELinux.
Also, can you try putting it under '/var/www/project'?
That is under where Apache normally expects stuff to be.
ok have disabled it and rerun apache
SELinux status: disabled
Still iam presenting the same error.
SELinux is disabled and paths and wsgi permisssions are 755 and still the
wsgi app won't run.
--
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
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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/qUrloVGZRDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Loading...