Welcome! Log In Create A New Profile

Advanced

Nginx multiple Tornado Apps on Ubuntu 10.04 Server edition

TornadoRocks
March 12, 2011 09:04AM
Hi all,
I am having quite a bit of issues in setting up tornado apps on ubuntu 10.04
server edition.

Here's the background information:
1) The location of my tornado application is at:
/srv/www/domain1.com/public_html/src
The folder structure is as such:
src/
static/
templates/
app.py

2) For my Nginx configuration, I am making use of /etc/nginx/sites-enabled
to host multiple tornado apps.
In the sites-enabled folder, I created a domain1.com file:
server {

listen 80;
server_name .www.tubeface.me;
rewrite ^/(.*) http://www.tubeface.me/$1 permanent;

}


server {

listen 80;
server_name www.tubeface.me;


access_log /srv/www/tubeface.me/logs/static.logs;

location / {

root /srv/www/tubeface.me/public_html/src/;
index app.py;

}

}


after saving the above file, i restarted nginx by running /etc/init.d/nginx
restart



Than I received the following error message:
Restarting nginx: [warn]: conflicting server name "domain1.com" on
0.0.0.0:80, ignored
[warn]: conflicting server name "domain1.com" on 0.0.0.0:80, ignored
nginx.

I did not make any changes to the default nginx.conf file by the way.

But the weird thing is that after starting my tornado app by running python
app.py,
I am able to access my app at http://xxx.xx.xx.xx:8888

So my questions are:
1) What caused the nginx error message?
2) Am I missing any configuration? ( such as changing /etc/hosts ? -> i've
tried this but it didnt work as well )
3) what can i do to enable my app at www.domain1.com ? ( I have already
pointed the DNS to my present host )

I need a bit of hand holding as I am kind of new in terms of putting Tornado
in production using Nginx.

I am using Tornado 1.2.1, Ubuntu 10.04, Nginx 0.8.54

Please help me~~~~

Best Regards.


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx multiple Tornado Apps on Ubuntu 10.04 Server edition

TornadoRocks March 12, 2011 09:04AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 319
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready