Skip to content
Snippets Groups Projects
nginx_note.conf_example 725 B
Newer Older
me5na7qbjqbrp's avatar
me5na7qbjqbrp committed
# This is an example NGINX site configuration for note_kfet behind a reverse proxy
# Only HTTP, please use a reverse proxy to secure it!
Pierre-antoine Comby's avatar
Pierre-antoine Comby committed

server {
me5na7qbjqbrp's avatar
me5na7qbjqbrp committed
    # Serve this site by default on HTTP
    listen 80 default_server;
    listen [::]:80 default_server;
me5na7qbjqbrp's avatar
me5na7qbjqbrp committed
    # Max upload size
    client_max_body_size 75M;
me5na7qbjqbrp's avatar
me5na7qbjqbrp committed
    # Django statics and media
Pierre-antoine Comby's avatar
Pierre-antoine Comby committed
    location /static {
me5na7qbjqbrp's avatar
me5na7qbjqbrp committed
        alias /var/www/note_kfet/static;
    }
    location /media  {
        alias /var/www/note_kfet/media;
    location /doc {
        alias /var/www/documentation;
    }
me5na7qbjqbrp's avatar
me5na7qbjqbrp committed
    # Send all non-media requests to the Django server.
Pierre-antoine Comby's avatar
Pierre-antoine Comby committed
    location / {
me5na7qbjqbrp's avatar
me5na7qbjqbrp committed
        uwsgi_pass unix:///var/www/note_kfet/note_kfet.sock;
        include /etc/nginx/uwsgi_params;