在本地进行爬网时进入站点时,将正常绘制HTML,如下所示。
<body>
<link rel="stylesheet" href="/css/login.css?ver=170912" />
<div class="container-fluid">
<form method="post" class="form-signin">
<h4 class="form-signin-heading"></h4>
<label for="userid" class="sr-only">아이디</label>
<input type="text" name="userid" id="userid" class="form-control" placeholder="id" maxlength="24" required="" autofocus="" />
<label for="inputPassword" class="sr-only">Password</label>
<input type="password" name="userpw" id="userpw" class="form-control" placeholder="pw" maxlength="60" required="" />
<button class="btn btn-lg btn-primary btn-block" type="submit">login</button>
<input type="hidden" name="url" value="" />
<input type="hidden" name="act" value="login" />
</form>
</div>
</body></html>
但是,访问AWS EC2(Linux)会导致403错误,如下所示。
我已经更改了用户代理属性,但这仍然在发生。
有什么办法可以解决这个问题?
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta charset="utf-8" />
<meta name="robots" content="noindex,nofollow" />
<title>403 Forbidden</title>
<style type="text/css">
html {background-color: #eee; font-family: sans-serif}
body {background-color: #fff; border: 1px solid #ddd; padding: 15px; margin: 15px}
h1 {font-family: serif}
pre {background-color: #eee; border: 1px solid #ddd; padding: 5px}
</style>
</head>
<body>
<h1>Error: 403 Forbidden</h1>
<p>You don't have permission to access on <tt>"/"</tt> this server.</p>
<pre>Nothing to see here..</pre>