Nginx multiple Tornado Apps on Ubuntu 10.04 Server edition

TornadoRocks ye.eugene at gmail.com
Sat Mar 12 14:47:37 MSK 2011


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.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20110312/1cefdc5a/attachment.html>


More information about the nginx mailing list