horilla-opensource / horilla

Horilla is a free and open source HR software.
https://www.horilla.com/
GNU Lesser General Public License v2.1
83 stars 44 forks source link

web address need changes #152

Open uckons opened 3 weeks ago

uckons commented 3 weeks ago

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

horilla-opensource commented 3 weeks ago

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

uckons commented 3 weeks ago

Hi @horilla-opensource server is the cloud, so i have to set hosts first before installation?

horilla-opensource commented 3 weeks ago

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

BhuviTheDataGuy commented 2 weeks ago

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