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

> 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 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