mirror of
https://github.com/outbackdingo/labca.git
synced 2026-01-27 18:19:33 +00:00
If you want to control e.g. the ssl_protocols or ssl_ciphers settings, create a file named 'custom-ssl.inc' in the /home/labca/nginx_data/conf.d/ directory (or when using the docker-only setup, either add a volume mount or edit the labca_nginx_conf volume to include the file). Similarly, 'custom-base.inc' can be created to e.g. define a custom log format, and 'custom.inc' could be created for any settings on the plain HTTP server context.
122 lines
2.8 KiB
Nginx Configuration File
122 lines
2.8 KiB
Nginx Configuration File
# Include any custom http context settings from custom-base.inc if that file exists
|
|
include conf.d/custom-base[.]inc;
|
|
|
|
server {
|
|
listen [::]:80 default_server ipv6only=off;
|
|
server_name _;
|
|
server_tokens off;
|
|
|
|
root /var/www/html;
|
|
index index.html index.htm index.nginx-debian.html;
|
|
|
|
# Include any custom plain-HTTP server context settings from custom.inc if that file exists
|
|
include conf.d/custom[.]inc;
|
|
|
|
location /admin/ {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
location /acme/ {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
location /aia/issuer {
|
|
include conf.d/proxy.inc;
|
|
proxy_pass http://boulder:4001;
|
|
}
|
|
|
|
location /directory {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
location /ocsp {
|
|
include conf.d/proxy.inc;
|
|
proxy_pass http://boulder:4002/;
|
|
}
|
|
|
|
location /rate-limits {
|
|
try_files $uri $uri.html $uri/ =404;
|
|
}
|
|
|
|
location /terms/ {
|
|
try_files $uri $uri.html $uri/ =404;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen [::]:443 default_server ssl ipv6only=off;
|
|
server_name _;
|
|
server_tokens off;
|
|
|
|
ssl_certificate /etc/nginx/ssl/labca_cert.pem;
|
|
ssl_certificate_key /etc/nginx/ssl/labca_key.pem;
|
|
|
|
root /var/www/html;
|
|
index index.html index.htm index.nginx-debian.html;
|
|
|
|
# Include any custom HTTPS server context settings from custom-ssl.inc if that file exists
|
|
include conf.d/custom-ssl[.]inc;
|
|
|
|
location ~ ^/admin/static/(.+) {
|
|
alias /var/www/html/$1;
|
|
}
|
|
|
|
location ~ ^/admin/.+/static/(.+) {
|
|
alias /var/www/html/$1;
|
|
}
|
|
|
|
location /admin/ {
|
|
include conf.d/proxy.inc;
|
|
proxy_set_header X-Request-Base "/admin";
|
|
proxy_pass http://gui:3000/;
|
|
error_page 502 504 /502.html;
|
|
}
|
|
|
|
location /admin/ws {
|
|
include conf.d/proxy.inc;
|
|
proxy_set_header X-Request-Base "/admin";
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
proxy_pass http://gui:3000/ws;
|
|
}
|
|
|
|
location /acme/ {
|
|
include conf.d/proxy.inc;
|
|
proxy_pass http://boulder:4001;
|
|
}
|
|
|
|
location /directory {
|
|
include conf.d/proxy.inc;
|
|
proxy_pass http://boulder:4001;
|
|
}
|
|
|
|
location /build {
|
|
include conf.d/proxy.inc;
|
|
proxy_pass http://boulder:4001;
|
|
}
|
|
|
|
location /aia/issuer {
|
|
include conf.d/proxy.inc;
|
|
proxy_pass http://boulder:4001;
|
|
}
|
|
|
|
location /ocsp {
|
|
include conf.d/proxy.inc;
|
|
proxy_pass http://boulder:4002/;
|
|
}
|
|
|
|
location /rate-limits {
|
|
try_files $uri $uri.html $uri/ =404;
|
|
}
|
|
|
|
location /terms/ {
|
|
try_files $uri $uri.html $uri/ =404;
|
|
}
|
|
|
|
# BEGIN temporary redirect
|
|
location = / {
|
|
return 302 /admin/;
|
|
}
|
|
# END temporary redirect
|
|
}
|