0

This is the first time I am deploying a django application. I created an AWS ec2 ubuntu instance. I followed the steps in this tutorial- https://adeshg7.medium.com/deploy-django-postgresql-on-ec2-using-apache2-from-scratch-42dc8e6682c1 The demo project was running fine on the server http://MyPublicIPv4Address:443. I then added another port in the security groups in AWS, and after that whenever I run "python manage.py runserver http://MyPublicIPv4Address:443 " on the puTTY connection command line, it gives me the same error:

CommandError: "http://MyPublicIPv4Address:443" is not a valid port number or address:port pair.

This seems like a django error in a very old version: https://code.djangoproject.com/ticket/14928. I cant find a way around this error. Any help would be appreciated. Thankyou

nid-22
  • 11
  • 1
  • Remove the `http://` part from the command, you only need to specify the IP and port. – Abdul Aziz Barkat Jun 07 '21 at 14:42
  • Also don't use that in production, https://docs.djangoproject.com/en/3.2/ref/django-admin/#runserver states "_DO NOT USE THIS SERVER IN A PRODUCTION SETTING_", See https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/ on how to deploy Django with various servers like Gunicorn, uWSGI, Apache, etc. – Abdul Aziz Barkat Jun 07 '21 at 14:46

1 Answers1

1

while running python manage.py runserver privateIPaddress:port, but in the browser use publicIPaddress:port.

nid-22
  • 11
  • 1