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 <
[email protected]> έγραψε:

> What other VirtualHost definitions do you have which use the same
> ServerName value of 'superhost.gr'?
>
> On 31 Aug 2018, at 6:55 pm, Νίκος @ SuperHost <
> [email protected]> wrote:
>
> 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 [email protected]
>
>     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 <
> [email protected]> έγραψε:
>
>>
>>
>> On 31 Aug 2018, at 6:27 pm, Νίκος @ SuperHost <
>> [email protected]> wrote:
>>
>> 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
>>
>>
>> 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
>>
>> If you want it to be hosted at the root of the site, use:
>>
>>     WSGIScriptAlias / /var/www/flask_app/webapp.py
>>
>> Graham
>>
>>
>> Στις Παρ, 31 Αυγ 2018 στις 7:17 π.μ., ο/η Graham Dumpleton <
>> [email protected]> έγραψε:
>>
>>> 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
>>>
>>> On 30 Aug 2018, at 10:47 pm, Νίκος Βέργος <[email protected]>
>>> wrote:
>>>
>>> Here is when i try to run it.
>>>
>>> Does it matter because iam under root? Does it have to be 'nikos' user?
>>>
>>>
>>> [root@superhost flask_app]# pwd
>>> /var/www/flask_app
>>>
>>> [root@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
>>> Dumpleton έγραψε:
>>>>
>>>> You are using:
>>>>
>>>>     http://superhost.gr/flask_app
>>>>
>>>> aren't you?
>>>>
>>>> You can't use:
>>>>
>>>>     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
>>>>
>>>> On 30 Aug 2018, at 10:16 pm, Νίκος Βέργος <[email protected]>
>>>> wrote:
>>>>
>>>> Here is the updated httpd-vhosts.conf
>>>> I habe reanmes project/ to flask_app
>>>>
>>>> <VirtualHost *:80>
>>>>     ServerName superhost.gr
>>>>     ServerAdmin [email protected]
>>>>
>>>>     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
>>>> Dumpleton έγραψε:
>>>>>
>>>>> 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
>>>>>
>>>>> On 30 Aug 2018, at 9:51 pm, Graham Dumpleton <[email protected]>
>>>>> wrote:
>>>>>
>>>>> 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.
>>>>>
>>>>> On 30 Aug 2018, at 9:29 pm, Νίκος Βέργος <[email protected]>
>>>>> wrote:
>>>>>
>>>>> ok have disabled it and rerun apache
>>>>>
>>>>> [root@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 [email protected].
>>>>> To post to this group, send email to [email protected].
>>>>> 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 [email protected].
>>>> To post to this group, send email to [email protected].
>>>> 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 [email protected].
>>> To post to this group, send email to [email protected].
>>> 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
>>> [email protected].
>>> To post to this group, send email to [email protected].
>>> 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 [email protected].
>> To post to this group, send email to [email protected].
>> 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
>> [email protected].
>> To post to this group, send email to [email protected].
>> 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 [email protected].
> To post to this group, send email to [email protected].
> 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
> [email protected].
> To post to this group, send email to [email protected].
> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to