Skip to content

support question: nginx.config example for a proxied server using LetsEncrypt? #527

Description

@laurencefass

I'm using this with jwilder/nginx-proxy.

Bit stuck getting started., Do I need to transform standalone nginx.config SSL options to work in a proxied server environment? Or it is as simple as mapping the key and cert nginx config options to files on known docker volumes? If so how does that file naming convention work?

In a jwilder/proxy environment who is doing the SSL encryption? Is it the proxied server, or the jwilder/proxy?

rewrite all http requests to SSL

server {
  listen 80;
  listen [::]:80;
  server_name $hostname;
  return 301 $https://www.$host$request_uri;
}

handle all request with SSL

server {
  listen 443 ssl;
  listen [::]:443 ssl;
  ssl_certificate     /var/www/html/web/domain.crt;
  ssl_certificate_key /var/www/html/web/domain.key;
  server_name www.$hostname;
  root /var/www/html/web;
  index index.php;
}

any help and advice appreciated.
thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/questionIssue that might be transferred to Discussions

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions