I'm using CentOS 6.5 with hostname NAFD only together with ip an address 192.9.200.69. I successfully installed Django-NginX-Gunicorn with Supervisor using this tutorial.
The django run successfully in 127.0.0.1:8000 without errors. I have no problem accessing the webserver django admin within the root user or other user within CentOS. With the assumption that django webserver should be accessable within the network, I can move on now to the next stage testing the application from client computer.
Here's the problem start.
When I try using http://nafd:8000/admin to connect from client computer within the network it gave me page not found. But when I used http://192.9.200.69/admin I get Nginx Welcome Powered Page.
I already set the CentOS firewall to accept port from 80 and 8000. I can ping the webserver using its ip address.
This is the first time I used Nginx-Gunicorn with Supervisor. I'm been using Django only in Win7 without giving me a problem accessing the webserver from client side.
From reading other related problems and possible solutions my direction now is installing DNS Server in my CentOS 6.5.
I need help if this is the right track to do? Or is there other possible way to solve this.
Thank you for your time reading.
Trace Route Result:
C:\Windows\System32>tracert -4 192.9.200.69
Tracing route to 192.9.200.69 over a maximum of 30 hops
1 1 ms <1 ms <1 ms 192.9.200.69
Trace complete.
NGINX Config
server {
server_name nafd;
access_log off;
location /static/ {
alias /opt/nafd/nafd_proj/nafd_proj/static;
}
location / {
proxy_pass http://127.0.0.1:80;
proxy_set_header X-Forward-Host $server_name;
proxy_set_header X-Real-IP $remote_addr;
add_header P3P 'CP="ALL DSP COR PSAa OUR NOR ONL UNI COM NAV"';
}
}
Gunicorn Config
command = '/opt/nafd/bin/gunicorn'
pythonpath = '/opt/nafd/nafd_proj'
bind = '127.0.0.1:80'
workers = 3
#user = 'nafdit'
Update
When I run django in python manage.py runserver 0.0.0.0:8001, I can access the application from any computer within the network using 192.9.200.69:8001/admin in url but nafd:8001/admin don't work remotely.
bin/gunicorn_startscript? - emcpow2