Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8935597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:01:20+00:00 2026-06-15T10:01:20+00:00

I deployed my Django app on Dotcloud. I’m using websockets with Gevent and django-socketio,

  • 0

I deployed my Django app on Dotcloud.

I’m using websockets with Gevent and django-socketio, so I used a custom service. For now, I’m still using ‘runserver_socketio’ in order to make it works.

Now, I would like to use Nginx to serve my static files. I found this : https://github.com/dotcloud/nginx-on-dotcloud

I tried to use it. Here is my dotcloud.yml:

    www:
       type: custom
       buildscript: nginx/builder
       processes:
          app: /home/dotcloud/env/bin/python myproject/manage.py runserver_socketio 0.0.0.0:$PORT_WWW
          nginx: nginx
       ports:
          www: http
       systempackages:
          - libevent-dev
          - python-psycopg2
          - libpcre3-dev
     db:
         type: postgresql

And I added the folder ‘nginx’ at the root of my app.

I also added at the end of my postinstall:

         nginx_config_template="/home/dotcloud/current/nginx/nginx.conf.in"

         if [ -e "$nginx_config_template" ]; then
               sed > $HOME/nginx/conf/nginx.conf < $nginx_config_template    \
               -e "s/@PORT_WWW@/${PORT_WWW:-42800}/g"
         else
               echo "($nginx_config_template) isn't there!!! Make sure it is in the correct location or else nginx won't be setup correctly."
         fi

But when I go to my app, after I push it, I get the error:

            403 Forbidden, nginx/1.0.14

And Nginx does serve the error pages 404.

So I don’t know why, but I don’t have access to my app anymore. Do you have any idea on how I can set my app with Nginx?

Thank you very much

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T10:01:22+00:00Added an answer on June 15, 2026 at 10:01 am

    I think Your problem is that you have two different processes fighting for the http port (80). You can only have one process running on port 80 at a time. Most people work around this by having nginx running on port 80, and then reverse proxying all traffic to the other process, which runs on a different port. This wouldn’t work for you, because nginx doesn’t support web sockets. So that means you would need to run nginx or the django app on a port other then 80. Which also isn’t ideal.

    At this point you have two other options

    1. Use a CDN, put all of your files on Amazon S3, and serve them from there (or cloudfront).

    2. Use dotCloud’s static service, this will be a separate service that just serves the static files. Here is what your dotcloud.yml would look like.

    dotcloud.yml

    www:
       type: custom
       processes:
          app: /home/dotcloud/env/bin/python myproject/manage.py runserver_socketio 0.0.0.0:$PORT_WWW
       ports:
          www: http
       systempackages:
          - libevent-dev
          - python-psycopg2
          - libpcre3-dev
     db:
         type: postgresql
     static:
         type: static
         approot: static_media
    

    Basically it adds a new service called static, and this new service, is looking for your static files in a directory in your project called static_media, located at the root of your project.

    If you use the static service, you will need to get the URL from the static service, and set your STATIC_URL appropriately in your django settings.py.

    Another gotcha with this setup, is if you are using django’s static_files app. Django’s static files app will copy all the static media into one common location. This doesn’t work with the static service, because the static service is separate, and will most likely live on a different host then your other service, so you will need to manually copy the files into the common static_media directory your self.

    For more information about the dotCloud static service, see these docs: http://docs.dotcloud.com/0.9/services/static/

    Because of the gotcha I mentioned for option 2, I would recommend using option 1. Doing this is a pretty easy if you use something like https://github.com/jezdez/django_compressor . It can send your files to s3 for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have deployed a Django 1.3.1 app on apache2 in my machine using mod_wsgi
I just deployed a website using Google App Engine that I built using Django.
I just deployed my first django app to the Heroku platform. I basically followed
I have a Django app deployed on Google App Engine that prematurely logs its
We have a web based application in production built using django. It is deployed
I deployed a Django app on Heroku that exposes an API which I call
I deployed my Django app to a remote server, but tastypie doesn't recognize a
I have a website built using Django on Dreamhost deployed successfully with Passenger and
So I just got my first django app deployed. I did a syncdb and
I am new to git, and deployed my first python-django app via github: https://github.com/staticdev/django-crud-utils

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.