Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nginx config #6

Closed
mastrolinux opened this issue Oct 19, 2016 · 0 comments
Closed

nginx config #6

mastrolinux opened this issue Oct 19, 2016 · 0 comments

Comments

@mastrolinux
Copy link

Please add the django custom nginx config:

upstream backend {
    server 127.0.0.1:3000;
} 
upstream backenddjango {
    server 127.0.0.1:8888;
}



server {

        listen 8443 ssl;

        root /var/www/;
        index index.html index.htm;
        server_name labchat.officine.cc;
    ssl on;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2; 
        ssl_certificate /etc/nginx/ssl/certificate-329605.crt;
        ssl_certificate_key /etc/nginx/ssl/labchat.key;

    location /labadmin {
        proxy_pass http://backenddjango;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $http_host;

        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forward-Proto http;
        proxy_set_header X-Nginx-Proxy true;

        proxy_redirect off;
    }

    location / {
        proxy_pass http://backend/;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $http_host;

        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forward-Proto http;
        proxy_set_header X-Nginx-Proxy true;

        proxy_redirect off;
    }
}
@xrmx xrmx closed this as completed Oct 20, 2016
xrmx pushed a commit that referenced this issue Feb 1, 2017
First stab at setting up labchat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants