Welcome! Log In Create A New Profile


localhost works but server_name times out!

February 06, 2018 10:29AM
I'm new to nginx and I'm trying to learn it fast so that I can use it in a work project.
But I have a weird problem. I have a django project which I run using uwsgi and I'm trying to use nginx as a reverse proxy for it. It works fine as long as I access it through localhost:port, but when I use the server name, it just gets stuck until it times out. There is no error, not even in /var/log/nginx/error.log.

These are my configurations:

server {

listen 9506;

server_name localhost;
charset utf-8;

client_max_body_size 75M;

location / {
root /home/user/shayan/Desktop/djangoProjects/user_management;
uwsgi_pass unix:/home/shayan/Desktop/djangoProjects/user_management/uwsgi-nginx.sock;
include /etc/nginx/uwsgi_params;




socket= :8001

init= :base
http= :8000


and this is how I run uwsgi:
uwsgi --wsgi-file user_management/wsgi.py --ini uwsgi.ini

So...what's wrong here?
Subject Author Posted

localhost works but server_name times out!

Credo February 06, 2018 10:29AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 60
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready