I am developing a Flask app, and I have deployed it locally to an Apache server (it's my first time with Apache). It works ok, but now I would like to add the PHPlitemyadmin php script in order to manager my sqlite database, but I can't seem to maki it work (I get Not Found).
I've been banging my head against the wall for the last hours. The site wiki says:
I copied the php script to /path/to/webApp/directory/
but I can't navigate to it. In Apache's access.log I can see "GET /phpliteadmin.php HTTP/1.1" 404 429 "
just after other correct gets in the same directory. Am I missing something? I also tried other php files, and none works, so maybe I should add something to Apache, despite the wiki not specifying anything about it. Ideally, I would like to access the script from /admin
.
This is my webApp.conf
in sites-enabled
.
<VirtualHost *:80>
ServerName <localIP>
WSGIScriptAlias / /path/to/webApp/directory/webApp.wsgi
DocumentRoot /path/to/webApp/directory
<Directory /path/to/webApp/directory>
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
The solution was to add the following line to the site .conf:
Alias "/admin" "/path/to/webApp/directory/phpliteadmin.php"