Accessing bottle server running on virtual machine - python

I've deployed a bottle application on Windows 2012 server deployed on AWS. I've configured the bottle server to run on 0.0.0.0 using run(host='0.0.0.0', port=9000).
Now, when I try to access the application from browser in my local machine, I get a "could not connect to ...." error. How do I start the bottle server on the VM?
Thanks.

Related

Running WSGI web server on a port (without using IIS)

Opening up a port for http request using WSGI (code is in Python+Django) on windows 10 - does not work for http requests coming from another machine
I have a python+django+mongodb site which works great when I run it through VS and now I would like to publish it.
My IIS set up with web.config with fastCGI gone bonkers and I am too frustrated to pursue it for the time being.
Now I decided to run a WSGI server on a port. So here is what I did. I started my app from command line by running my manage.py like this...
C:\Users\<myname>\AppData\Local\Continuum\anaconda3\python.exe manage.py runserver --noreload --settings=myapp.settings
And it starts the server and I can visit the site at http://localhost:8000 and everything works great - LOCALLY.
But with my machine IP x.y.z.w - I cannot access it from another machine
by visiting http://x.y.z.w:8000
Why can't my server listens to the port 8000 from another machine on the SAME network?
What do I have to do to allow this?
I am on Windows 10

Python Flask server only connects to MySQL in docker host network_mode

I have a simple Python Flask web server, running in a docker container along with an Nginx reverse proxy, and a MySQL database.
When the docker compose is run in network_mode: 'host', everything (nginx-python-mysql) works fine.
But when it is switched to bridge networking, Nginx and the python endpoint app seem to work fine, but the python app is unable to connect to the MySQL instance.
I am exposing the MySQL port 3306. Everything is running on a CentOS-7 vm.
The Python Flask app is running on an gunicorn Python WSGI HTTP Server instance. The MySQL database is based on tutum/mysql.
I have tried both pymysql and SQLAlchemy clients on the python endpoint, and I can only get them to connect to the mysql server in host network_mode.
And as far as I can tell from the docker instance info, the MySQL container is fine, and on the same network as the python endpoint container.
Unfortunately, this is all running on an air gaped server, so its difficult to post the config files here, but the only difference between the host and bridge mode settings is that the nginx ssl config proxy pass has https://endpoint instead of https://localhost, and connecting via https to the python app works in both host and bridge modes. The python app connects to the mysql database on host 0.0.0.0
What could cause the python app to mysql database connection problem to only work in host mode?

Python App on Apache2 access via domain

I am running a python app on port 8080 in a subdirectory on my apache2 webspace on my ubuntu server. I can access this application via server ip and port 8080. I got a domain which refers to my website. I want to access this python app via domain/subdirectory. How can i do this?

Django web-server runs locally on windows server 2016 but is not available remotely

Django web-server runs locally on windows server 2016 at http://127.0.0.1:8000 I have access to a web-page and all its functions, but when I try to access it remotely using http://193.124.64.241:8000 the page is not available. I've opened port 8000 in windows brandmauer settings for incoming and outcomming connections but it hasn't helped.

Flask development server blocked by proxy at work

I am trying to use the flask development server at an office with a strict proxy that blocks the default 127.0.0.1:5000 host and port. I have tried using different hosts and ports with no success. I have also tried setting up Flask with XAMPP on Windows via mod_wsgi with no success. I am looking for an option to continue testing flask on my local machine with as little setup as possible as my production environment is a PaaS and does not use the same setup as my local machine.

Categories