Update u_e-nginx.md

Dieser Commit ist enthalten in:
André Peters 2020-10-08 13:45:52 +02:00 committet von GitHub
Ursprung aae8782f54
Commit b573b7cd7a
Es konnte kein GPG-SchlĂĽssel zu dieser Signatur gefunden werden
GPG-SchlĂĽssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -28,6 +28,40 @@ server {
}
```
Another example with a reverse proxy configuration:
``` hl_lines="9,21"
server {
ssl_certificate /etc/ssl/mail/cert.pem;
ssl_certificate_key /etc/ssl/mail/key.pem;
index index.php index.html;
client_max_body_size 0;
root /web;
include /etc/nginx/conf.d/listen_plain.active;
include /etc/nginx/conf.d/listen_ssl.active;
server_name example.domain.tld;
location ^~ /.well-known/acme-challenge/ {
allow all;
default_type "text/plain";
}
if ($scheme = http) {
return 301 https://$host$request_uri;
}
location / {
proxy_pass http://127.0.0.1:3000/;
proxy_set_header Host $http_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-Proto $scheme;
client_max_body_size 0;
}
}
```
The filename is not important, as long as the filename carries a .conf extension.
It is also possible to extend the configuration of the default file `site.conf` file: