By skapoor
I’m using django 1.9, gunicorn, nginx and postgres as database for my website. My site is up and running but when i try to login as admin or user i get server error 500 on webpage and on terminal i get “is the server running on host 139.62.45.246 and accepting tcp/ip connections on port 5432”.
I thought there might be a problem in postgres.conf and pg_hba.conf. But there are 2 host all all…one for IPv4 and one for IPv6 in pg_hba.conf.
I can’t figure out how to edit pg_hba.conf. Please use above’s IP to explain.
One more thing will it solve the problem or i might need to do something else?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Did you createsuperuser?
Is the dbuser specified in your settings in /etc/postgresql/9.X/main/pg_hba.conf?
If so and if server is local to django, try setting password to nothing in settings and the user like this: local databasename databaseuser trust in pg_hba.
Reload postgres service postgresql restart and gunicorn service gunicorn restart
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.