-
Notifications
You must be signed in to change notification settings - Fork 2
/
nginx.conf
36 lines (29 loc) · 900 Bytes
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Nginx reverse proxy
server {
listen :80;
listen [::]:80;
server_name domain.ext;
return 301 https://$server_name$request_uri;
}
server {
listen :443 ssl http2;
listen [::]:443;
server_name domain.ext;
# Uncomment lines below when you already have SSL certificates. You can use Let's Encrypt with certbot : https://certbot.eff.org/
#ssl on;
#ssl_certificate /etc/letsencrypt/live/domain.ext/fullchain.pem;
#ssl_certificate_key /etc/letsencrypt/live/domain.ext/privkey.pem;
error_log /var/log/nginx/domain.ext_error.log;
location / {
index index.php index.html;
proxy_pass http://127.0.0.1:8080;
}
# well-known for Let's Encrypt if your prefer using webroot instead of Nginx plugin
location /.well-known/acme-challenge {
root /var/www/letsencrypt;
allow all;
auth_basic off;
index index.html index.htm;
break;
}
}