Flask and Perl on Apache - can they coexist on Port 443?

12 Views Asked by At

I have Flask WSGI running on Apache2, port 443, via the Virtual Host directive in a sites-enabled conf file on Ubuntu 22.4. I also have CGI scripts (both Perl .cgi and Python .py enabled by the Add Handler directive in /etc/apache2/apache2.conf). Flask on 443 knocks out CGI which still works on port 80 as the Listen directive in ports.conf supports both.

Changing the directive in flask.conf succeeds only in flipping the ports - set it to 80, CGI works on 443. Flask on 80, and vice versa.

Flask uses /opt/flask-app as a Document Root whereas CGI uses /var/www/html. The ServerName directive in flask.conf is currently set to the IP address of the box. Is it possible to have both flask and CGI on port 443? Thanks much, I'll be glad to get back to working with databases!

0

There are 0 best solutions below