mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-22 02:17:26 +00:00
31 lines
647 B
Nginx Configuration File
31 lines
647 B
Nginx Configuration File
|
server {
|
||
|
listen 80;
|
||
|
listen [::]:80 default_server ipv6only=on;
|
||
|
listen 443 ssl;
|
||
|
|
||
|
server_name $PUBLIC_HOSTNAME;
|
||
|
|
||
|
ssl_certificate $STORAGE_ROOT/ssl/ssl_certificate.pem;
|
||
|
ssl_certificate_key $STORAGE_ROOT/ssl/ssl_private_key.pem;
|
||
|
|
||
|
root $STORAGE_ROOT/www/static;
|
||
|
|
||
|
index index.html index.htm;
|
||
|
|
||
|
location / {
|
||
|
# First attempt to serve request as file, then
|
||
|
# as directory, then fall back to displaying a 404.
|
||
|
try_files $uri $uri/ /index.html;
|
||
|
}
|
||
|
|
||
|
#error_page 404 /404.html;
|
||
|
|
||
|
# redirect server error pages to the static page /50x.html
|
||
|
#
|
||
|
#error_page 500 502 503 504 /50x.html;
|
||
|
#location = /50x.html {
|
||
|
# root /usr/share/nginx/html;
|
||
|
#}
|
||
|
}
|
||
|
|