
내 Linux 서버(SLES11)에 IHS 웹서버를 구성했습니다.네트워크 DAV활성화되었습니다. curl
다음 URL을 사용하면 파일을 성공적으로 업로드할 수 있습니다.
$ curl --insecure --upload-file testfile.txt \
https://<URL>.com/upload/hro/ -u hro:$HRO_WEBDAV_PASSWORD
다음과 같은 출력이 생성됩니다.
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>201 Created</title>
</head><body>
<h1>Created</h1>
<p>Resource /upload/hro/testfile.txt has been created.</p>
<hr />
<address>IBM_HTTP_Server Server at <URL> Port 443</address>
URL 대신 "localhost"를 사용하려고 하면 작동하지 않습니다. SSL 오류가 발생합니다.
$ curl --insecure --upload-file testfile.txt \
https://localhost/upload/hro/ -u hro:$HRO_WEBDAV_PASSWORD
결과는 다음과 같습니다.
curl: (51) SSL peer certificate or SSH remote key was not OK
이는 인증서가 "localhost"가 아닌 URL에 대해 서명되기 때문에 일관성이 있습니다. 그러나 나는 그 옵션을 사용해왔고 --insecure
그 옵션을 사용하여 이 실패를 무시하려고 합니다.
질문
localhost
무엇 을 위해 사용해야 합니까curl
?- 이 스크립트에 localhost URL을 사용하는 옵션이 없나요?