apache - Configuring ssl to work with nginx -


i'm having challenge making sure ssl works website hosted on ec2 being managed via serverpilot.

the following http config server:

server {     listen       80;     listen       [::]:80;     server_name         example.net         www.example.net       ;      root   /srv/users/serverpilot/apps/app/public;      access_log  /srv/users/serverpilot/log/app/example_nginx.access.log  main;     error_log  /srv/users/serverpilot/log/app/example_nginx.error.log;      proxy_set_header    host              $host;     proxy_set_header    x-real-ip         $remote_addr;     proxy_set_header    x-forwarded-for   $proxy_add_x_forwarded_for;      include /etc/nginx-sp/vhosts.d/example.d/*.nonssl_conf;     include /etc/nginx-sp/vhosts.d/example.d/*.conf; } 

in vhosts.d folder i've created following ssl version of website:

server {     listen 443 ssl;     listen [::]:443 ssl;     server_name         www.example.net         example.net     ;      ssl on;      ssl_certificate /etc/letsencrypt/live/www.example.net/cert.pem;     ssl_certificate_key /etc/letsencrypt/live/www.example.net/privkey.pem;      root   /srv/users/serverpilot/apps/app/public;      access_log  /srv/users/serverpilot/log/app/example_nginx.access.log  main;     error_log  /srv/users/serverpilot/log/app/example_nginx.error.log debug;      proxy_set_header    host              $host;     proxy_set_header    x-real-ip         $remote_addr;     proxy_set_header    x-forwarded-for   $proxy_add_x_forwarded_for;     proxy_set_header    x-forwarded-ssl on;     proxy_set_header    x-forwarded-proto $scheme;      include /etc/nginx-sp/vhosts.d/app/*.nonssl_conf;     include /etc/nginx-sp/vhosts.d/app/*.conf; } 

after saving, there's no response if curl https://example.net.

additionally, nginx forwards requests apache via

/etc/nginx-sp/vhosts.d/app/main.conf 

which has:

location / {     proxy_pass      http://127.0.0.1:81; } 

my question how can make nginx pick ssl certificates, configuration correct? pointers welcome.

thanks!


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -