之前发的太拉胯了, 重新写了一份.
针对后台文件夹更名后, 用try_files判断,免去写白名单验证了, 官方爱咋折腾出了问题再说了.
CUSTOMADMINPATH为匹配后台自定义admin目录
location ~ [^/]\.php(/|$) { YOUR php-fpm configure in HERE }
location ~ ^/{ try_files $uri $uri/ /index.php?rp=$uri; }
location ~ ^/(admin|CUSTOMADMINPATH_1|CUSTOMADMINPATH_2)/ { try_files $uri $uri/ index.php?rp=$uri; }
原始的弃用了:
location ~ /templates/.*\.tpl$ { return 404; }
location ^~ /vendor/ { return 404; }
location ~ ^/(images/em|invoice|login|password|account|store|download|knowledgebase|announcements|clientarea/ssl-certificates|user/(verification|accounts|profile|password|security|verify)|cart/(domain/renew)|domain/pricing|cart/order|images/kb)/?(.*)$ { rewrite (.*) /index.php?rp=$uri last; }
location ~ ^/(.*)/(client|client!\.php|client/(.*)|table/(.*)|search!\.php|search/(.*)|apps|billing|setup|user|services|addons|domains|utilitiesemailmarketer!\.php|utilities/(.*)|logs|help!\.php|help/license|modules|image/(recent|upload)|validation_com/(.*))/?(.*)$ { try_files $uri $uri/ /$1/index.php?rp=$uri; }
如果whmcs放在二级目录下则小改一下.
把uri改成rewrite 的正则匹配.
https://s3.amazonaws.com/releases.whmcs.com/v2/pkgs/whmcs-8.4.1-release.1.zip
location ~ /(announcements|knowledgebase|download|store|password|cart|account|subscription)(.*) { rewrite (.*) /index.php; }
location ~ /(.*)/(addons|apps|search|domains|help|services|setup|utilities|clients)(.*) { rewrite (.*) /admin/index.php;}
方案一:
if (!-f $request_filename){ rewrite (.*) /index.php; }
方案二:
rewrite ^/(announcements|knowledgebase|download|store|password|cart|account|subscription)(.*)$ /index.php;
其他设置:
location ~* \.(tpl|inc|cfg)$ { deny all; }
location ^~ /vendor/ { deny all; }
方案一主要匹配本地没有的就丢index.php上去, 也可以用try_files
方案二主要是直接进行rewrite.
其他配置主要是隐藏一些目录和文件不让访问.
总的来说用 location来匹配稍微稳妥一些, 例如 /admin/clientsservices.php 会被为静态匹配到, 还是得运用if来判断匹配.
流程之一, 模版格式化解决繁琐操作.
你好, [NAME]
请尽快处理我们收到的以下滥用投诉报告,谢谢。
我们收到了来自您订单的投诉报告。我们要求您尽快调查此事。完成调查后,请回复以下问题的答复:
1)问题的根源是什么?
2)您采取了哪些步骤解决此问题?
3)你采取了哪些措施来防止这种情况再次发生?
由于此活动违反了我们的服务条款,因此我们要求您在接下来的12小时内回复。
如果我们在这段时间内没有收到回复,我们可能会暂时中断您的服务,以防止进一步的恶意活动。
=========== COMPLAINT STARTS HERE ============
投诉内容(模版里面去掉此处)
投诉内容(模版里面去掉此处)
投诉内容(模版里面去掉此处)
=========== COMPLAINT ENDS HERE ==============
在此过程中,请继续保持我们的状态更新,如果您有任何问题,请告知我们。
Kind Regards,
公司名 Support