Skip to content

Commit 882ffee

Browse files
authored
Change Filegator file to 24 hr clock (hestiacp#4168)
* Change Date time format Filegator to 24hr clock Instead 12 Clock * Optional WP template to disable xmlrpc.php access WP
1 parent b41e803 commit 882ffee

File tree

3 files changed

+189
-0
lines changed

3 files changed

+189
-0
lines changed

install/deb/filemanager/filegator/configuration.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
".tpl",
3232
".yaml",
3333
];
34+
$dist_config["frontend_config"]["date_format"] = "YY/MM/DD H:mm:ss";
3435
$dist_config["frontend_config"]["guest_redirection"] = "/login/";
3536
$dist_config["frontend_config"]["upload_max_size"] = 1024 * 1024 * 1024;
3637

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
#=========================================================================#
2+
# Default Web Domain Template #
3+
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
4+
# https://hestiacp.com/docs/server-administration/web-templates.html #
5+
#=========================================================================#
6+
7+
server {
8+
listen %ip%:%web_ssl_port% ssl;
9+
server_name %domain_idn% %alias_idn%;
10+
root %sdocroot%;
11+
index index.php index.html index.htm;
12+
access_log /var/log/nginx/domains/%domain%.log combined;
13+
access_log /var/log/nginx/domains/%domain%.bytes bytes;
14+
error_log /var/log/nginx/domains/%domain%.error.log error;
15+
16+
ssl_certificate %ssl_pem%;
17+
ssl_certificate_key %ssl_key%;
18+
ssl_stapling on;
19+
ssl_stapling_verify on;
20+
21+
# TLS 1.3 0-RTT anti-replay
22+
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
23+
if ($anti_replay = 425) { return 425; }
24+
25+
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
26+
27+
location = /favicon.ico {
28+
log_not_found off;
29+
access_log off;
30+
}
31+
32+
location = /robots.txt {
33+
try_files $uri $uri/ /index.php?$args;
34+
log_not_found off;
35+
access_log off;
36+
}
37+
38+
location ~ /\.(?!well-known\/) {
39+
deny all;
40+
return 404;
41+
}
42+
43+
location = /xmlrpc.php {
44+
deny all;
45+
access_log off;
46+
log_not_found off;
47+
return 403;
48+
}
49+
50+
location / {
51+
try_files $uri $uri/ /index.php?$args;
52+
53+
location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|webp|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
54+
expires 30d;
55+
fastcgi_hide_header "Set-Cookie";
56+
}
57+
58+
location ~* /(?:uploads|files)/.*.php$ {
59+
deny all;
60+
return 404;
61+
}
62+
63+
location ~ [^/]\.php(/|$) {
64+
try_files $uri =404;
65+
66+
include /etc/nginx/fastcgi_params;
67+
68+
fastcgi_index index.php;
69+
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
70+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
71+
72+
fastcgi_pass %backend_lsnr%;
73+
74+
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
75+
76+
if ($request_uri ~* "/wp-admin/|/wp-json/|wp-.*.php|xmlrpc.php|index.php|/store.*|/cart.*|/my-account.*|/checkout.*") {
77+
set $no_cache 1;
78+
}
79+
80+
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in|woocommerce_items_in_cart|woocommerce_cart_hash|PHPSESSID") {
81+
set $no_cache 1;
82+
}
83+
}
84+
}
85+
86+
location /error/ {
87+
alias %home%/%user%/web/%domain%/document_errors/;
88+
}
89+
90+
location /vstats/ {
91+
alias %home%/%user%/web/%domain%/stats/;
92+
include %home%/%user%/web/%domain%/stats/auth.conf*;
93+
}
94+
95+
proxy_hide_header Upgrade;
96+
97+
include /etc/nginx/conf.d/phpmyadmin.inc*;
98+
include /etc/nginx/conf.d/phppgadmin.inc*;
99+
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
100+
}
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
#=========================================================================#
2+
# Default Web Domain Template #
3+
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
4+
# https://hestiacp.com/docs/server-administration/web-templates.html #
5+
#=========================================================================#
6+
7+
server {
8+
listen %ip%:%web_port%;
9+
server_name %domain_idn% %alias_idn%;
10+
root %docroot%;
11+
index index.php index.html index.htm;
12+
access_log /var/log/nginx/domains/%domain%.log combined;
13+
access_log /var/log/nginx/domains/%domain%.bytes bytes;
14+
error_log /var/log/nginx/domains/%domain%.error.log error;
15+
16+
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
17+
18+
location = /favicon.ico {
19+
log_not_found off;
20+
access_log off;
21+
}
22+
23+
location = /robots.txt {
24+
try_files $uri $uri/ /index.php?$args;
25+
log_not_found off;
26+
access_log off;
27+
}
28+
29+
location ~ /\.(?!well-known\/) {
30+
deny all;
31+
return 404;
32+
}
33+
34+
location / {
35+
try_files $uri $uri/ /index.php?$args;
36+
37+
location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|webp|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
38+
expires 30d;
39+
fastcgi_hide_header "Set-Cookie";
40+
}
41+
42+
location ~* /(?:uploads|files)/.*.php$ {
43+
deny all;
44+
return 404;
45+
}
46+
47+
location = /xmlrpc.php {
48+
deny all;
49+
access_log off;
50+
log_not_found off;
51+
return 403;
52+
}
53+
54+
location ~ [^/]\.php(/|$) {
55+
try_files $uri =404;
56+
57+
include /etc/nginx/fastcgi_params;
58+
59+
fastcgi_index index.php;
60+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
61+
62+
fastcgi_pass %backend_lsnr%;
63+
64+
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
65+
66+
if ($request_uri ~* "/wp-admin/|/wp-json/|wp-.*.php|xmlrpc.php|index.php|/store.*|/cart.*|/my-account.*|/checkout.*") {
67+
set $no_cache 1;
68+
}
69+
70+
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in|woocommerce_items_in_cart|woocommerce_cart_hash|PHPSESSID") {
71+
set $no_cache 1;
72+
}
73+
}
74+
}
75+
76+
location /error/ {
77+
alias %home%/%user%/web/%domain%/document_errors/;
78+
}
79+
80+
location /vstats/ {
81+
alias %home%/%user%/web/%domain%/stats/;
82+
include %home%/%user%/web/%domain%/stats/auth.conf*;
83+
}
84+
85+
include /etc/nginx/conf.d/phpmyadmin.inc*;
86+
include /etc/nginx/conf.d/phppgadmin.inc*;
87+
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
88+
}

0 commit comments

Comments
 (0)