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 DumpletonWhat 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 ÎÎ¯ÎºÎ¿Ï @ SuperHostI 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 DumpletonYou 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 Dumpletonhttp://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.comProxyPass / 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.