Hello. I have a Linux server with 5 virtual servers, each with an SSL certificate installed. In one of them I have installed a private Python environment and installed an Angular web application. I have added to the FirewallD the port that the application asks for (9000), I have modified the application sources and compiled, and started the server with “gunicorn” but when I try to access it, I cannot do so through https:/ /111.222.333.444:9000 Only through http. How can i fix this? Thank you so much.
Have your modifications to the original source caused the issue ? As this is not a webmin issue but an issue with the software you have installed a better course of action would be to reach out to the authors of the software you installed for a solution
No. The only address that the application takes is changing the destination URL (https://111.222.333.444:9000) in the settings. And it has been under the supervision of the manufacturer.
So you have to modify the source and recompile it to change a setting ? That sounds really old fashioned having hard coded settings, each to their own i guess. Using netstat or ss check to see what is actually listening on port 9000, it may give you a clue, but i would guess somewhere in the software you have installed there will be an option for it to listen in ssl mode rather than standard
You don’t have TLS enabled on your server. It is not expected to be available via https, because it is not https.
You shouldn’t do it this way, anyway, in the general case. It’s recommended to run gunicorn (or any other app server) locally (either on a UNIX file socket or a local port) and proxy to it with your web server. That protects the app server from a variety of things and allows you to run everything on the usual web ports (80 and 443).
Returning to this, I hope I have explained myself well:
I created a private Python environment, activated it, and ran:
python3 -m venv myfolder
source bin/activate
First I did a test:
python manage.py runserver
And this is the result:
(apiw-env) [myuser apiw-env]# python manage.py runserver
April 17, 2024 - 09:21:04
Django version 5.0.2, using settings 'apiwin4you.settings.development'
Starting development server at http://127.0.0.1:9000/
Quit the server with CONTROL-C.
You wont access it via https as the server is running in http mode (as your screenshot shoows) you need to proxy to it or reach out to the developer to find out how to start the server with ssl enabled