create a file /etc/nginx/conf.d/virtual.conf
#
# A virtual host using mix of IP-, name-, and port-based configuration
#
server {
listen 8080;
server_name chat.djangoer.com;
location / {
root /home/chat/;
index index.html index.htm;
}
}
restart nginx: /etc/init.d/nginx restart