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
nginx: nginx
makes me believe that the nginx process will be run under the nginx user. Does the nginx user have permission to read the files in the nginx folder? – Amusing