mirror of
https://github.com/moparisthebest/mailiverse
synced 2024-11-15 13:45:01 -05:00
112 lines
2.2 KiB
Nginx Configuration File
112 lines
2.2 KiB
Nginx Configuration File
user nginx;
|
|
worker_processes 4;
|
|
pid /run/nginx.pid;
|
|
|
|
events {
|
|
worker_connections 768;
|
|
# multi_accept on;
|
|
}
|
|
|
|
http {
|
|
|
|
##
|
|
# Basic Settings
|
|
##
|
|
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
keepalive_timeout 65;
|
|
types_hash_max_size 2048;
|
|
# server_tokens off;
|
|
|
|
# server_names_hash_bucket_size 64;
|
|
# server_name_in_redirect off;
|
|
|
|
include /opt/nginx/conf/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
##
|
|
# Logging Settings
|
|
##
|
|
|
|
access_log /var/log/nginx/access.log;
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
##
|
|
# Gzip Settings
|
|
##
|
|
|
|
gzip on;
|
|
gzip_disable "msie6";
|
|
|
|
# gzip_vary on;
|
|
# gzip_proxied any;
|
|
# gzip_comp_level 6;
|
|
# gzip_buffers 16 8k;
|
|
# gzip_http_version 1.1;
|
|
# gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
|
|
|
##
|
|
# Virtual Host Configs
|
|
##
|
|
|
|
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
|
|
server {
|
|
listen 443;
|
|
# server_name mail.mailiverse.com;
|
|
|
|
ssl on;
|
|
ssl_certificate nginx-ssl.crt;
|
|
ssl_certificate_key nginx-ssl.key;
|
|
|
|
ssl_session_timeout 5m;
|
|
|
|
ssl_protocols SSLv2 SSLv3 TLSv1;
|
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
|
ssl_prefer_server_ciphers on;
|
|
|
|
location /Mailiverse/ {
|
|
proxy_pass http://127.0.0.1:8080; # my existing apache instance
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
}
|
|
|
|
location / {
|
|
autoindex off;
|
|
root /var/local/www/;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
# server_name mail.mailiverse.com;
|
|
|
|
ssl off;
|
|
|
|
location /Mailiverse/ {
|
|
proxy_pass http://127.0.0.1:8080; # my existing apache instance
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
}
|
|
|
|
location / {
|
|
autoindex off;
|
|
root /var/local/www/;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|