out of the blue my virtual host config doesn't work anymore. So my setup sould be quite easy: On Port 80, I want to deliver two WSGI apps, and that's the .conf file I'm using:
<VirtualHost *:80>
ServerName mogli.secret.de
#########
# RESTAPI
#########
WSGIScriptAlias /mogli/api /opt/mogli/restapi/app.wsgi
<Directory /opt/mogli/restapi/>
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>
#########
# WEBAPP
#########
WSGIScriptAlias /mogli/webapp /opt/mogli/webapp/app.wsgi
<Directory /opt/mogli/webapp/>
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel debug
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
So like I said I had it working, so I don't know really what changed. The Apache server starts without a problem. I also ran a2ensite MogliFlask
successfully.
But when I open my webapp, it just says 404 Not found. (The default index page at /
works, btw)
The access log just says the same:
"GET /mogli/api/doc HTTP/1.1" 404 507 "-" "Mozilla/5.0 [...]"
The error log says nothing at all when I open the webpage, there are only some notices:
[Thu Oct 14 07:29:36.906477 2021] [core:notice] [pid 159:tid 140444421547136] AH00094: Command line: '/usr/sbin/apache2'
[Thu Oct 14 07:30:11.780214 2021] [mpm_event:notice] [pid 159:tid 140444421547136] AH00491: caught SIGTERM, shutting down
[Thu Oct 14 07:52:09.914051 2021] [mpm_event:notice] [pid 165:tid 140689596499072] AH00489: Apache/2.4.38 (Debian) mod_wsgi/4.6.5 Python/3.7 configured -- resuming normal operations
When running apachectl -t -D DUMP_VHOSTS
I get this status:
VirtualHost configuration:
*:80 is a NameVirtualHost
default server mogli.secret.de (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost mogli.secret.de (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost mogli.secret.de (/etc/apache2/sites-enabled/MogliFlask.conf:1)
I'm running a Debian 10.
Things I tried so far:
- Restarting the server
- Reinstalling Apache2 and WSGI mod
- Googling how to actually debug this kind of error without success
So my queston is - how do I track my error? What's wrong with the VirtualHost config? Any type of hint would be helpful, I'm very lost on this. Thank you!