-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
613a8f0
commit 49aef73
Showing
4 changed files
with
55 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
docs/en/modules/ROOT/partials/nginx-configuration-example.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
server { | ||
if ($host = ipt.example.org) { | ||
return 302 https://$host$request_uri; | ||
} | ||
listen 80 default_server; | ||
listen [::]:80 default_server; | ||
server_name ipt.example.org; | ||
return 404; | ||
} | ||
|
||
server { | ||
server_name ipt.example.org; | ||
|
||
# Linux packages or Docker example, or ROOT.war in Tomcat | ||
location / { | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $remote_addr; | ||
proxy_set_header X-Forwarded-Proto https; | ||
proxy_set_header Host $host; | ||
proxy_pass http://localhost:8080/; | ||
} | ||
|
||
# Alternative: example for an IPT deployed in a servlet container like Tomcat | ||
#location /ipt/ { | ||
# proxy_set_header X-Real-IP $remote_addr; | ||
# proxy_set_header X-Forwarded-For $remote_addr; | ||
# proxy_set_header X-Forwarded-Proto https; | ||
# proxy_set_header Host $host; | ||
# proxy_pass http://localhost:8080/ipt/; | ||
#} | ||
|
||
# Typical LetsEncrypt configuration | ||
listen [::]:443 ssl ipv6only=on; | ||
listen 443 ssl; | ||
ssl_certificate /etc/letsencrypt/live/ipt.example.org/fullchain.pem; | ||
ssl_certificate_key /etc/letsencrypt/live/ipt.example.org/privkey.pem; | ||
include /etc/letsencrypt/options-ssl-nginx.conf; | ||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; | ||
} |