How can we remove port from URL?

How can we access the URL without a port for Django? I have set all things like domain name and Django by the marketplace. But it accessing by port. How can we fix it? This means we need a URL like www.domainname.com instead of www.doaminname.com:8000 for the Django application.

1 Reply

@begamsanjida writes:

This means we need a URL like www.domainname.com instead of www.domainname.com:8000 for the Django application.

No, it doesn't… You can have something like

https://www.domainname.com/django

that the web server silently redirects to your web app at

https://localhost:8000

You'll have to make sure that the query string (everything after '?' in the original URL) and POST info is preserved when you redirect. Your web app will have to reply to the original requestor…not to the redirect. Both apache2(8) and nginx(8) can do this…

-- sw

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct