Skip to content

Commit a2c7eed

Browse files
Merge pull request hestiacp#1400 from ioannidesalex/patch-18
Update sendy.tpl
2 parents d6f9ab6 + 8655249 commit a2c7eed

File tree

1 file changed

+32
-17
lines changed
  • install/ubuntu/16.04/templates/web/nginx/php-fpm

1 file changed

+32
-17
lines changed

install/ubuntu/16.04/templates/web/nginx/php-fpm/sendy.tpl

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,41 @@ server {
77
access_log /var/log/nginx/domains/%domain%.bytes bytes;
88
error_log /var/log/nginx/domains/%domain%.error.log error;
99
10-
if (!-f $request_filename){
11-
rewrite ^/([a-zA-Z0-9-]+)$ /$1.php last;
12-
}
10+
location = /favicon.ico {
11+
log_not_found off;
12+
access_log off;
13+
}
1314

14-
location / {
15-
index index.php;
15+
location = /robots.txt {
16+
allow all;
17+
log_not_found off;
18+
access_log off;
19+
}
20+
21+
location ~* "/\.(htaccess|htpasswd|git|svn|DS_Store)$" {
22+
deny all;
23+
}
1624

17-
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
18-
expires max;
25+
location ~ /(readme.html|license.txt) {
26+
deny all;
27+
}
28+
29+
if (!-f $request_filename){
30+
rewrite ^/([a-zA-Z0-9-]+)$ /$1.php last;
31+
}
32+
33+
location / {
34+
try_files $uri $uri/ /index.php?$args;
35+
location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar|pdf)$ {
36+
expires 1d;
1937
}
2038

2139
location ~ [^/]\.php(/|$) {
2240
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
23-
if (!-f $document_root$fastcgi_script_name) {
24-
return 404;
25-
}
26-
27-
fastcgi_pass %backend_lsnr%;
28-
fastcgi_index index.php;
29-
include /etc/nginx/fastcgi_params;
41+
try_files $uri =404;
42+
fastcgi_pass %backend_lsnr%;
43+
fastcgi_index index.php;
44+
include /etc/nginx/fastcgi_params;
3045
}
3146

3247
location /l/ {
@@ -58,9 +73,9 @@ server {
5873
alias %home%/%user%/web/%domain%/document_errors/;
5974
}
6075

61-
location ~* "/\.(htaccess|htpasswd)$" {
62-
deny all;
63-
return 404;
76+
location /vstats/ {
77+
alias %home%/%user%/web/%domain%/stats/;
78+
include %home%/%user%/web/%domain%/stats/auth.conf*;
6479
}
6580

6681
include /etc/nginx/conf.d/phpmyadmin.inc*;

0 commit comments

Comments
 (0)