Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # mailcow site configuration
- # ! Do not remove this header !
- server {
- listen 80;
- listen [::]:80;
- server_name <internal IP> <Mailcow external hostname e.g. mail.example.com>;
- server_tokens off;
- root /var/www/mail;
- client_max_body_size 25m;
- root /var/www/mail;
- index index.html index.htm index.php;
- error_page 502 /redir.html;
- location /redir.html {
- return 301 /admin.php;
- }
- location ~ ^/(rc/logs)/ {
- deny all;
- }
- location ~ /(\.ht) {
- deny all;
- return 404;
- }
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- location / {
- try_files $uri $uri/ index.php;
- }
- location ~ \.php$ {
- include fastcgi_params;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_pass unix:/var/run/php-mail-fpm.sock;
- fastcgi_index index.php;
- fastcgi_param HTTPS on;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_read_timeout 630;
- fastcgi_keep_conn on;
- }
- }
- server {
- listen 127.0.0.1:81;
- location ~ \.cgi$ {
- root /usr/lib/cgi-bin;
- include /etc/nginx/fastcgi_params;
- fastcgi_pass unix:/var/run/fcgiwrap.socket;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement