You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.0 KiB
Nginx Configuration File
62 lines
1.0 KiB
Nginx Configuration File
# Basic configuration
|
|
user nginx;
|
|
worker_processes 1;
|
|
error_log /dev/stderr info;
|
|
pid /var/run/nginx.pid;
|
|
load_module "modules/ngx_mail_module.so";
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
# Standard HTTP configuration with slight hardening
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
access_log /dev/stdout;
|
|
sendfile on;
|
|
keepalive_timeout 65;
|
|
server_tokens off;
|
|
|
|
server {
|
|
listen 80;
|
|
|
|
# Actual logic
|
|
location / {
|
|
return 301 $scheme://$host/webmail/;
|
|
}
|
|
|
|
location /webmail {
|
|
proxy_pass http://webmail;
|
|
}
|
|
|
|
location /admin {
|
|
proxy_pass http://admin;
|
|
}
|
|
|
|
location /webdav {
|
|
proxy_pass http://webdav:5232;
|
|
}
|
|
}
|
|
}
|
|
|
|
mail {
|
|
server_name test.mailu.io;
|
|
auth_http http://172.18.0.1:5000/nginx;
|
|
proxy_pass_error_message on;
|
|
|
|
server {
|
|
listen 25;
|
|
protocol smtp;
|
|
smtp_auth plain;
|
|
}
|
|
|
|
server {
|
|
listen 143;
|
|
protocol imap;
|
|
imap_auth plain;
|
|
}
|
|
|
|
|
|
}
|