0

I'm having an issue running and connecting to my python django server on a windows 2012 server. To run the server I use command: python manage.py 0.0.0.0:80. This results in an error below

[Error 10013]: an attempt was made to access a socket in a way forbidden by its access permissions

I've tried running the command prompt as an administrator with no change. For reference, I am able to run the server on port 8000 but then I cannot connect to the port remotely. I have turned off firewalls as well so that is probably not the issue.

While it is preferable to run the django on port 80, I am trying to get this working on any port.

peterpod
  • 216
  • 1
  • 2
  • 9
  • 1
    What do you mean by "but then I cannot connect to the port remotely"? And does running `python manage.py --insecure 0.0.0.0:80` work? – Ella Sharakanski Apr 24 '15 at 23:55
  • 1
    possibly [duplicate](http://stackoverflow.com/questions/2778840/socket-error-errno-10013-an-attempt-was-made-to-access-a-socket-in-a-way-forb)? Shortly, try to run using elevated UAC rights, check Windows Firewall, Antivirus :) – Reishin Apr 25 '15 at 00:09
  • You should not run django with `manage.py runserver` this is used for development. Look at the documentation for deployment https://docs.djangoproject.com/en/1.8/howto/deployment/ – Paco Apr 25 '15 at 08:49
  • Ella Shar. I meant that I cannot hit the server from my local machine which has a different ip. However the answer was that a windows process was reserving port 80 & 443 – peterpod Apr 25 '15 at 17:27

1 Answers1

0

Port 80 (and many other ports) is reserved by Windows Server. Checkout this https://serverfault.com/questions/633179/cant-make-confluence-run-on-port-80-with-windows-server-2012-r2,

You may want to google "Windows Server Reserved port" for more info and a way to "unreserve" it.

skyline75489
  • 14,089
  • 7
  • 43
  • 59
  • Thanks this was the answer. A process was using port 80 so I stopped the process and was able to run the server – peterpod Apr 25 '15 at 17:28