Skip to content

Instantly share code, notes, and snippets.

@aldhinya
Last active April 23, 2019 11:16
Show Gist options
  • Save aldhinya/0a67ec0434a0283f6d5601708081862a to your computer and use it in GitHub Desktop.
Save aldhinya/0a67ec0434a0283f6d5601708081862a to your computer and use it in GitHub Desktop.
# Virtual Host configuration for example.com
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
server {
listen 80;
server_name mail.jarkom.com;
root /usr/share/squirrelmail/;
index index.php index.html;
location ~ /\.ht {
deny all;
access_log off;
log_not_found off;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
}
location /squirrelmail {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/squirrelmail/(.+\.php)$ {
try_files $uri/ =404;
root /usr/share/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
}
}
location /webmail {
rewrite ^/* /squirrelmail last;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment