[Fixed]-How to deploy django on VPS with external subdomain.?

1👍

To respond to ‘example.com’ and any subdomains, start the domain with a dot

ALLOWED_HOSTS = [‘.example.com’, ‘203.0.113.5’]

I didn’t even try how to run django on subdomains, but from article link you shared, you missed some configuration in your settings.py

ALLOWED_HOSTS = [‘member.domain.com’]

Changed

ALLOWED_HOSTS = [‘.domain.com’]

Hope this will solve your problem

👤Luthfi

Leave a comment