mirror of
https://github.com/geerlingguy/ansible-for-devops.git
synced 2024-05-19 06:50:03 +00:00
26 lines
718 B
Django/Jinja
26 lines
718 B
Django/Jinja
# HTTPS Test server configuration.
|
|
|
|
# Redirect HTTP traffic to HTTPS.
|
|
server {
|
|
listen 80 default_server;
|
|
server_name _;
|
|
index index.html;
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
# Proxy HTTPS traffic using a self-signed certificate.
|
|
server {
|
|
listen 443 ssl default_server;
|
|
server_name {{ server_hostname }};
|
|
|
|
location / {
|
|
include /etc/nginx/proxy_params;
|
|
proxy_pass http://localhost:8080;
|
|
proxy_read_timeout 90s;
|
|
proxy_redirect http://localhost:8080 {{ server_hostname }};
|
|
}
|
|
|
|
ssl_certificate {{ certificate_dir }}/{{ server_hostname }}/fullchain.pem;
|
|
ssl_certificate_key {{ certificate_dir }}/{{ server_hostname }}/privkey.pem;
|
|
}
|