I have a EC2 instance want to run Django app on it. This EC2 instance already have a Apache server on port 80. Now I want to host my Django project on port 9090. The instance has static IP 200.200.200.200.
ubuntu@ip-10-242-229-213:~/flanders$ python manage.py runserver 200.200.200.200:9090 Validating models...
0 errors found Django version 1.3.1, using settings 'flanders.settings' Development server is running at http://200.200.200.200:9090/ Quit the server with CONTROL-C. Error: That IP address can't be assigned-to. ubuntu@ip-10-242-229-213:~/flanders$
It tells me Error: That IP address can't be assigned-to
, So I change to
ubuntu@ip-10-242-229-213:~/flanders$ python manage.py runserver 127.0.0.1:9090 Validating models...
0 errors found Django version 1.3.1, using settings 'flanders.settings' Development server is running at http://127.0.0.1:9090/ Quit the server with CONTROL-C.
The application starts without problem but when I try to access it http://200.200.200.200:9090/flandersapp/tags
, I doesn't work. By the way, I allow port 9090 in my security setting.
I solved myself. I need to use the private IP provided by EC2 instead of public IP
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With