Im not sure what m doing wrong here but the server cant seem too find my php files hosted on the server. Not sure if this is due to Apache lacking something or php itself. Ive searched all over the internet followed everything I can find and am having no luck.
http://netauto.app.local/data.php thats the file im trying to reach.
-rwxrwxrwx 1 root root 6493 Jul 26 23:47 action_search.php - call this
-rwxrwxrwx 1 root root 640 Jul 26 23:48 data.php - call this
-rwxrwxrwx 1 root root 20 Jul 29 21:53 info.php - call this
-rwxrwxrwx 1 root root 15272 Jul 2 18:43 __init__.py
-rwxrwxrwx 1 root root 12964 Jul 2 18:43 __init__.pyc
drwxrwxrwx 2 root root 4096 Jun 18 16:37 __pycache__
drwxrwxrwx 3 root root 4096 Jul 27 01:46 static
drwxrwxrwx 4 root root 4096 Jul 26 22:48 templates
drwxrwxrwx 6 root root 4096 Apr 10 16:32 venv
Ive elevated everything to root with chmod 777 I want to change that to 644 but was running out of ideas. All the ones marked "call this" return a 404 not found when I try and navigate too it via the url. Also a debug on the website returns a 404 not found when I hit the php action.
folder paths look like this
---------flaskapp.wsgi
-----------------/FlaskApp
---------------------__init__.py
----------------------data.php
----------------------action_search.php
----------------------info.php
----------------------/templetes
----------------------/static
Heres the php mod
root@pdc-mgmt-netutl:/var/www/FlaskApp/FlaskApp# php -v PHP 7.2.19-0ubuntu0.18.04.1 (cli) (built: Jun 4 2019 14:48:12) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.19-0ubuntu0.18.04.1, Copyright (c) 1999-2018, by Zend Technologies root@pdc-mgmt-netutl:/var/www/FlaskApp/FlaskApp# cd /etc/apache2/sites-available/
Below is my flask.conf
<VirtualHost *:80>
WSGIScriptAlias / /var/www/FlaskApp/flaskapp.wsgi
WSGIDaemonProcess FlaskApp python-home=/var/www/FlaskApp/FlaskApp/venv/
WSGIProcessGroup FlaskApp
ServerName localhost
DocumentRoot /var/www/FlaskApp/FlaskApp/
<Directory /var/www/FlaskApp/FlaskApp>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Require all granted
allow from all
</Directory>
Alias /static /var/www/FlaskApp/FlaskApp/static
<Directory /var/www/FlaskApp/FlaskApp/static/>
Order allow,deny
Allow from all
Require all granted
</Directory>
Alias /templetes /var/www/FlaskApp/FlaskApp/templetes
<Directory /var/www/FlaskApp/FlaskApp/templetes/>
Order allow,deny
Allow from all
Require all granted
</Directory>
LoadModule php7_module modules/php7apache2_4.dll
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
AddType application/x-httpd-php .php
AddHandler application/x-httpd-php .php
PHPIniDir "/etc/php/7.2/apache2/php.ini"
</VirtualHost>