Francis Daly
September 05, 2018 11:52AM
On Tue, Sep 04, 2018 at 02:30:18PM -0400, Frank_Mascarell wrote:

Hi there,

> I have a VPS on Digital Ocean with Ubuntu 18.04, Nginx, Gunicorn, Django,
> and a test web application, all configured (ufw) to work with http: 80.
> Everything works perfectly.

> Now I modify the file /sites-available/LibrosWeb to allow SSL traffic with a
> self-signed certificate, since I do not have a domain.

> Result "Error 502 Bad Gateway".

> This is the initial code that works well with http: 80:

> location / {
> include proxy_params;
> proxy_pass http://unix:/run/gunicorn.sock;
> }

> And this is the code to allow SSL (error 502):

> location / {
> include proxy_params;
> proxy_pass https://unix:/run/gunicorn.sock;
> }

Unless you changed something on the gunicorn side, you almost certainly
want to use http, not https, to the socket.

So change the proxy_pass back to what it was.


The first tutorial you linked to does include some troubleshooting
tips. If you still have a problem, including the output from the nginx
parts of those will probably help the next person.

Good luck with it,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Problem when reconfiguring Nginx for SSL with self-signed certificate

Frank_Mascarell September 04, 2018 02:30PM

Re: Problem when reconfiguring Nginx for SSL with self-signed certificate

Francis Daly September 05, 2018 11:52AM

Re: Problem when reconfiguring Nginx for SSL with self-signed certificate

Frank_Mascarell September 05, 2018 04:49PM

Re: Problem when reconfiguring Nginx for SSL with self-signed certificate

Francis Daly September 05, 2018 05:40PM

Re: Problem when reconfiguring Nginx for SSL with self-signed certificate

Frank_Mascarell September 05, 2018 06:51PM

Re: Problem when reconfiguring Nginx for SSL with self-signed certificate

Francis Daly September 06, 2018 03:02AM

Re: Problem when reconfiguring Nginx for SSL with self-signed certificate

Frank_Mascarell September 08, 2018 11:25PM

Re: Problem when reconfiguring Nginx for SSL with self-signed certificate

Francis Daly September 10, 2018 08:00AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 289
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready