DEV Community

Discussion on: Flask Deploy with Apache on CentOS - Minimal Setup

Collapse
 
sirishamuddana profile image
Sirisha-Muddana

Hi,
I Followed your steps from the above tutorial without using lynx, directly used browser and given localhost:8080 but browser not giving Hello world and showing that site cant be reached. restarted Apache server, port 8080 is listening and open,even wsgi file is also same like yours. below are the logs. pls check it out
[Wed Mar 25 16:26:18.575220 2020] [core:notice] [pid 7322:tid 139847942441216] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Wed Mar 25 17:59:57.166193 2020] [wsgi:error] [pid 7326:tid 139847205377792] [client 162.243.129.144:49818] Target WSGI script not found or unable to stat: /var/www/flask/wsgi.py

Collapse
 
sm0ke profile image
Sm0ke • Edited

Hello Sirisha,
Thanks for noticing the article. Try to apply this short checklist:

  • check if /var/www/flask/wsgi.py exists on disk
  • see the permissions of the file

Please notice that Apache runs under certain privileges. Make sure that Apache can access the file.
Let me know if my suggestions helped.

Collapse
 
sirishamuddana profile image
Sirisha-Muddana • Edited

yes, exists on disk and given permission using this command: chmod 755 /var/www/flask/wsgi.py.. but no change