Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

May I know how do I start a Tornado app on a production server ( ubuntu 10.04 ) and access it on a domain name without the port number in the domain name?

Here's the background information

The location of my tornado app: /srv/www/ .

The directory structure of src/ is:


I intend to host multiple Tornado apps on my server so I am making use of the /etc/nginx/sites-enable and /etc/nginx/sites-available feature.

In my /etc/nginx/sites-available folder, i created a file:

server {
    listen 80;
    root /srv/www/;

    location / {

        try_files $uri @tornado;

    location @tornado {

        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

After which I made a symbolic link to /etc/nginx/sites-enabled. Than i restarted nginx.

I didnt change the default nginx config file.

After starting tornado app by running python , I can access my app at If i type attempt to access it at , then I'll see a "Welcome to Nginx" message.

Is there are way I can access my app at ?

Best Regards.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The server_name option should contain a hostname and not an URL. With your example:


The Tornado documentation contains an example with four Tornado instances running behind nginx:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.