-
-
Notifications
You must be signed in to change notification settings - Fork 662
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change Filegator file to 24 hr clock (#4168)
* Change Date time format Filegator to 24hr clock Instead 12 Clock * Optional WP template to disable xmlrpc.php access WP
- Loading branch information
1 parent
acd6114
commit 350d8e4
Showing
3 changed files
with
189 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
install/deb/templates/web/nginx/php-fpm/wordpress-disable-xmlrpc.stpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
#=========================================================================# | ||
# Default Web Domain Template # | ||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS # | ||
# https://hestiacp.com/docs/server-administration/web-templates.html # | ||
#=========================================================================# | ||
|
||
server { | ||
listen %ip%:%web_ssl_port% ssl; | ||
server_name %domain_idn% %alias_idn%; | ||
root %sdocroot%; | ||
index index.php index.html index.htm; | ||
access_log /var/log/nginx/domains/%domain%.log combined; | ||
access_log /var/log/nginx/domains/%domain%.bytes bytes; | ||
error_log /var/log/nginx/domains/%domain%.error.log error; | ||
|
||
ssl_certificate %ssl_pem%; | ||
ssl_certificate_key %ssl_key%; | ||
ssl_stapling on; | ||
ssl_stapling_verify on; | ||
|
||
# TLS 1.3 0-RTT anti-replay | ||
if ($anti_replay = 307) { return 307 https://$host$request_uri; } | ||
if ($anti_replay = 425) { return 425; } | ||
|
||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*; | ||
|
||
location = /favicon.ico { | ||
log_not_found off; | ||
access_log off; | ||
} | ||
|
||
location = /robots.txt { | ||
try_files $uri $uri/ /index.php?$args; | ||
log_not_found off; | ||
access_log off; | ||
} | ||
|
||
location ~ /\.(?!well-known\/) { | ||
deny all; | ||
return 404; | ||
} | ||
|
||
location = /xmlrpc.php { | ||
deny all; | ||
access_log off; | ||
log_not_found off; | ||
return 403; | ||
} | ||
|
||
location / { | ||
try_files $uri $uri/ /index.php?$args; | ||
|
||
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)$ { | ||
expires 30d; | ||
fastcgi_hide_header "Set-Cookie"; | ||
} | ||
|
||
location ~* /(?:uploads|files)/.*.php$ { | ||
deny all; | ||
return 404; | ||
} | ||
|
||
location ~ [^/]\.php(/|$) { | ||
try_files $uri =404; | ||
|
||
include /etc/nginx/fastcgi_params; | ||
|
||
fastcgi_index index.php; | ||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
|
||
fastcgi_pass %backend_lsnr%; | ||
|
||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*; | ||
|
||
if ($request_uri ~* "/wp-admin/|/wp-json/|wp-.*.php|xmlrpc.php|index.php|/store.*|/cart.*|/my-account.*|/checkout.*") { | ||
set $no_cache 1; | ||
} | ||
|
||
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") { | ||
set $no_cache 1; | ||
} | ||
} | ||
} | ||
|
||
location /error/ { | ||
alias %home%/%user%/web/%domain%/document_errors/; | ||
} | ||
|
||
location /vstats/ { | ||
alias %home%/%user%/web/%domain%/stats/; | ||
include %home%/%user%/web/%domain%/stats/auth.conf*; | ||
} | ||
|
||
proxy_hide_header Upgrade; | ||
|
||
include /etc/nginx/conf.d/phpmyadmin.inc*; | ||
include /etc/nginx/conf.d/phppgadmin.inc*; | ||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*; | ||
} |
88 changes: 88 additions & 0 deletions
88
install/deb/templates/web/nginx/php-fpm/wordpress-disable-xmlrpc.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
#=========================================================================# | ||
# Default Web Domain Template # | ||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS # | ||
# https://hestiacp.com/docs/server-administration/web-templates.html # | ||
#=========================================================================# | ||
|
||
server { | ||
listen %ip%:%web_port%; | ||
server_name %domain_idn% %alias_idn%; | ||
root %docroot%; | ||
index index.php index.html index.htm; | ||
access_log /var/log/nginx/domains/%domain%.log combined; | ||
access_log /var/log/nginx/domains/%domain%.bytes bytes; | ||
error_log /var/log/nginx/domains/%domain%.error.log error; | ||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*; | ||
location = /favicon.ico { | ||
log_not_found off; | ||
access_log off; | ||
} | ||
|
||
location = /robots.txt { | ||
try_files $uri $uri/ /index.php?$args; | ||
log_not_found off; | ||
access_log off; | ||
} | ||
|
||
location ~ /\.(?!well-known\/) { | ||
deny all; | ||
return 404; | ||
} | ||
|
||
location / { | ||
try_files $uri $uri/ /index.php?$args; | ||
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)$ { | ||
expires 30d; | ||
fastcgi_hide_header "Set-Cookie"; | ||
} | ||
|
||
location ~* /(?:uploads|files)/.*.php$ { | ||
deny all; | ||
return 404; | ||
} | ||
|
||
location = /xmlrpc.php { | ||
deny all; | ||
access_log off; | ||
log_not_found off; | ||
return 403; | ||
} | ||
|
||
location ~ [^/]\.php(/|$) { | ||
try_files $uri =404; | ||
include /etc/nginx/fastcgi_params; | ||
fastcgi_index index.php; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
fastcgi_pass %backend_lsnr%; | ||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*; | ||
if ($request_uri ~* "/wp-admin/|/wp-json/|wp-.*.php|xmlrpc.php|index.php|/store.*|/cart.*|/my-account.*|/checkout.*") { | ||
set $no_cache 1; | ||
} | ||
|
||
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") { | ||
set $no_cache 1; | ||
} | ||
} | ||
} | ||
|
||
location /error/ { | ||
alias %home%/%user%/web/%domain%/document_errors/; | ||
} | ||
|
||
location /vstats/ { | ||
alias %home%/%user%/web/%domain%/stats/; | ||
include %home%/%user%/web/%domain%/stats/auth.conf*; | ||
} | ||
|
||
include /etc/nginx/conf.d/phpmyadmin.inc*; | ||
include /etc/nginx/conf.d/phppgadmin.inc*; | ||
include %home%/%user%/conf/web/%domain%/nginx.conf_*; | ||
} |