Create the conf/ directory for nginx
This commit is contained in:
61
nginx/conf/nginx.conf
Normal file
61
nginx/conf/nginx.conf
Normal file
@@ -0,0 +1,61 @@
|
||||
# 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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user