I build basic authorization in apache.Only one line in /var/www/html/remote.html
.
<p>it is a test </p>
Now to verify the username and password with curl.
curl -u xxxx:xxxx -v http://111.111.111.111/remote.html
* Trying 111.111.111.111...
* TCP_NODELAY set
* Connected to 111.111.111.111 (111.111.111.111) port 80 (#0)
* Server auth using Basic with user 'xxxx'
> GET /remote.html HTTP/1.1
> Host: 111.111.111.111
> Authorization: Basic dGVzdHBhc3M6MTIzNDU2Nzg=
> User-Agent: curl/7.52.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Fri, 07 Sep 2018 03:32:42 GMT
< Server: Apache/2.4.6 (CentOS)
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: POST, GET, PUT, DELETE, OPTIONS
< Access-Control-Allow-Credentials: true
< Access-Control-Allow-Headers: Authorization,DNT,User-Agent,Keep-Alive,Content-Type,accept,origin,X-Requested-With
< Last-Modified: Fri, 07 Sep 2018 03:22:41 GMT
< ETag: "b2-5753f8537e26c"
< Accept-Ranges: bytes
< Content-Length: 178
< Content-Type: text/html; charset=UTF-8
<
<p>it is a test </p>
* Curl_http_done: called premature == 0
* Connection #0 to host 111.111.111.111 left intact
Input http://111.111.111.111/remote.html?username=xxxx&password=xxxx
in browser,the authorization window pop up.
The url has contained right username and password verified by curl ,why remote.html can't be shown directly?
Why my url http://111.111.111.111/remote.html?username=xxxx&password=xxxx
can't provide authorization info to apache server?