windows下iis在配合使用urlscan的时候,TRACE和OPTIONS直接返回403而不是200和404的方法
[ 2025-04-30 14:35:57 | 作者: admin ]
p.s. windows下面用urlscan可以方便的拦截 TRACE,OPTIONS,PUT等敏感method,只保留get和post。但是默认情况下回返回200状态再给一个404页面,这不友好,我们需要直接返回一个403状态。
一、打开urlscan.ini,指定出现拦截时候的跳转文件 RejectResponseUrl
然后在根目录建立403目录,下面建立一个网站语言匹配的默认文件 index.php index.aspx 等等,访问就能返回403了
使用curl做TRACE 验证
-v 或 --verbose:详细模式,显示请求和响应的详细信息,包括请求头、响应头和数据传输过程。
...
阅读全文…
一、打开urlscan.ini,指定出现拦截时候的跳转文件 RejectResponseUrl
RejectResponseUrl=/403
然后在根目录建立403目录,下面建立一个网站语言匹配的默认文件 index.php index.aspx 等等,访问就能返回403了
<?php
header("HTTP/1.1 403 Forbidden");
exit;
?>
header("HTTP/1.1 403 Forbidden");
exit;
?>
使用curl做TRACE 验证
-v 或 --verbose:详细模式,显示请求和响应的详细信息,包括请求头、响应头和数据传输过程。
...
阅读全文…
windows下使用winsw-1.18,把nginx和php fastcgi程序安装成服务运行
[ 2025-04-25 10:59:56 | 作者: admin ]
nginx的服务配置
进入nginx文件目录,复制winsw-1.18,改winsw-1.18.exe为nginx-service.exe,
当前目录下新建 nginx-service.xml,内容如下:
阅读全文…
进入nginx文件目录,复制winsw-1.18,改winsw-1.18.exe为nginx-service.exe,
当前目录下新建 nginx-service.xml,内容如下:
<service>
<id>nginx</id>
<name>nginx</name>
<description>nginx</description>
<logpath>D:/nginx1.19.5/logs</logpath>
<logmode>rotate</logmode>
<depend></depend>
<workingdir>D:/nginx1.19.5</workingdir>
<executable>D:/nginx1.19.5/nginx.exe</executable>
<stopexecutable>D:/nginx1.19.5/nginx.exe -s stop</stopexecutable>
...<id>nginx</id>
<name>nginx</name>
<description>nginx</description>
<logpath>D:/nginx1.19.5/logs</logpath>
<logmode>rotate</logmode>
<depend></depend>
<workingdir>D:/nginx1.19.5</workingdir>
<executable>D:/nginx1.19.5/nginx.exe</executable>
<stopexecutable>D:/nginx1.19.5/nginx.exe -s stop</stopexecutable>
阅读全文…
一则windows下运行php出现No input file specified 错误处理记录
[ 2025-04-25 10:48:25 | 作者: admin ]
windows服务器为 nginx+fastcgi 的php运行模式,使用winsw-1.18来安装nginx和php fastcgi的,作为服务运行。 http://blog.xg98.com/article.asp?id=2996
搭建环境出现 No input file specified 目录错误的提示
nginx的配置中写为
php.ini中为
可以看到盘符存在大小写的差异,把nginx.conf的root值改为小写 h:/web/blog.xg98.com/wwwroot; 错误消失
搭建环境出现 No input file specified 目录错误的提示
nginx的配置中写为
root H:/web/blog.xg98.com/wwwroot;
php.ini中为
open_basedir = "h:/web/;C:/WINDOWS/TEMP/;"
可以看到盘符存在大小写的差异,把nginx.conf的root值改为小写 h:/web/blog.xg98.com/wwwroot; 错误消失
只需一行代码,任意网页秒变可编辑! document.designMode = "on";
[ 2025-04-12 15:17:41 | 作者: admin ]
打开浏览器控制台(F12),复制粘贴这行代码,回车即可。
document.designMode = "on";
1