Skip to content Skip to sidebar Skip to footer

Flask Routes Other Than '/' Not Being Served By Apache

So I should preface this by saying I am new to Flask, Apache, and web serving so I apologize in advance for my ignorance. I am trying to set up a remote data logging project with R

Solution 1:

It isn't working because you are mounting the application at a sub URL in Apache, but your route in Flask also has the mount point in it. This means the URL you use would need to be /sysinfo/sysinfo/restart_now.

You either need to use in the Flask route just /restart_now, or change the Apache configuration to use:

WSGIScriptAlias /sysinfo /var/www/sysinfo/sysinfo.wsgi/sysinfo

The addition of the trailing /sysinfo on last argument fiddles things so that the Flask application still sees the mount point as part of PATH_INFO, which is what Flask routes off.

BTW, you don't need WSGIScriptReloading On as that is the default anyway.


Post a Comment for "Flask Routes Other Than '/' Not Being Served By Apache"