관리 메뉴

웹개발자의 기지개

[ASP] HTTP 오류 403.1 - Forbidden (실행 파일의 실행을 허용하지 않는 디렉터리에서 CGI, ISAPI 또는 다른 실행 프로그램을 실행하려고 했습니다) 메세지 막기 본문

ASP

[ASP] HTTP 오류 403.1 - Forbidden (실행 파일의 실행을 허용하지 않는 디렉터리에서 CGI, ISAPI 또는 다른 실행 프로그램을 실행하려고 했습니다) 메세지 막기

http://portfolio.wonpaper.net 2023. 9. 25. 12:15

 

[ web.config ]

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <security>
            <requestFiltering>
                <requestLimits maxAllowedContentLength="102476000"/>
                <verbs>
                    <!-- <remove verb="OPTIONS" /> -->
                    <add verb="OPTIONS" allowed="false" />
                    <add verb="PUT" allowed="false" />
                    <add verb="DELETE" allowed="false" />
                    <add verb="TRACE" allowed="false" />
 
                </verbs>
            </requestFiltering>
        </security>
 
        <defaultDocument>
            <files>
                <add value="index.asp" />
            </files>
        </defaultDocument>
        <handlers>
            <remove name="ASP_HTML_CLASSIC" />
            <add name="ASP_HTML_CLASSIC" path="*.html" verb="GET,HEAD,POST" modules="IsapiModule" scriptProcessor="%windir%\system32\inetsrv\asp.dll" resourceType="File" preCondition="bitness64" />
        </handlers>
<!--
        <httpErrors errorMode="Detailed" />
-->
 
        <httpErrors errorMode="DetailedLocalOnly">
                    <remove statusCode="500" subStatusCode="-1" />
                    <remove statusCode="502" subStatusCode="-1" />
                    <remove statusCode="501" subStatusCode="-1" />
                    <remove statusCode="412" subStatusCode="-1" />
                    <remove statusCode="406" subStatusCode="-1" />
                    <remove statusCode="405" subStatusCode="-1" />
                    <remove statusCode="401" subStatusCode="-1" />
                    <remove statusCode="403" subStatusCode="-1" />
                    <remove statusCode="404" subStatusCode="-1" />
                    <error statusCode="404" prefixLanguageFilePath="" path="/error/404.html" responseMode="Redirect" />
                    <error statusCode="403" prefixLanguageFilePath="" path="/error/404.html" responseMode="Redirect" />
                    <error statusCode="401" prefixLanguageFilePath="" path="/error/404.html" responseMode="Redirect" />
                    <error statusCode="405" prefixLanguageFilePath="" path="/error/404.html" responseMode="Redirect" />
                    <error statusCode="406" prefixLanguageFilePath="" path="/error/404.html" responseMode="Redirect" />
                    <error statusCode="412" prefixLanguageFilePath="" path="/error/404.html" responseMode="Redirect" />
                    <error statusCode="501" prefixLanguageFilePath="" path="/error/404.html" responseMode="Redirect" />
                    <error statusCode="502" prefixLanguageFilePath="" path="/error/404.html" responseMode="Redirect" />
                    <error statusCode="500" prefixLanguageFilePath="" path="/error/500.html" responseMode="Redirect" />
                </httpErrors>
 
        <rewrite>
            <outboundRules>
                <rule name="server info change" enabled="true">
                    <match serverVariable="RESPONSE_SERVER" pattern=".*" />
                    <action type="Rewrite" value="aaaa" />
                </rule>
            </outboundRules>
        </rewrite>
 
    </system.webServer>
 
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="/error/404.html" />
    </system.web>
 
</configuration>
 
cs

 

<httpErrors> 태그 부분이 바로 그 부분이다.

Comments