0

I'm working on a project now and I'm currently using Django+uWSGI+Nginx to deploy the backend on the server. There is also a frontend using Vue.js on the same server.

So the frontend is www.mysite.com The backend uses port 8000 as www.mysite.com:8000

But I encountered a problem, that is, many users' work network blocked port 8000, so that users could only use the front end, but could not connect to the back end.

Is there any way to avoid using www.mysite.com:8000 and replace it with another url?

ji pei
  • 1

1 Answers1

0

when you run the server you can specify the port:

python3 manage.py runserver 8000

you can also modify manage.py:

from django.core.management.commands.runserver import Command as runserver
runserver.default_port = "8000"

(In your case replace 8000 with the port you want)

user_cr
  • 110
  • 10
  • Yes, this I know, but I wonder whether it can be avoided that this link https://example.com:/ is open and gives the sublinks like example.com/backend/ or something else – ji pei Apr 22 '22 at 12:58