horilla
horilla copied to clipboard
web address need changes
Hi All. i'm just finished set up and also config nginx reverse proxy, but when user try to reset password the link is somethink like http://localhost:8000/reset-password/51dec800-1bdd-4856-ad1a-047fd3e74b41 how to change the link to use https://domain-name/reset-password/51dec800-1bdd-4856-ad1a-047fd3e74b41
regards Syukie
Hi @uckons , Did you try out the user password reset request from the local or in the cloud server? Because the domain name section of the request url is taken automatically by django from the host details. We just pass the url path details to django.
With Regards, Team Horilla
Hi @horilla-opensource server is the cloud, so i have to set hosts first before installation?
Hi @uckons , No, the base url is automatically taken up from the server. Can you check with your nginx configuration for the path?
With Regards, Team Horilla
We did this recently.
Use nginx as the proxy pass
sudo nano /etc/nginx/sites-available/mydjango
server {
listen 80;
server_name your_domain.com;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
sudo ln -s /etc/nginx/sites-available/mydjango /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx
and then inside your settings.py
CSRF_TRUSTED_ORIGINS=(list, ["https://your.domain.com"]),
You can also use certbot or own SSL on nginx
Hi @uckons , Any updates ?
With Regards, Team Horilla
Hi @uckons , We are closing this issue due to inactivity. It seems that there hasn't been any recent activity or discussion, and we believe it may have been resolved or is no longer relevant. If you feel this issue is still important and should be addressed, please feel free to reopen it or create a new issue with updated details.
With Regards, Team Horilla