caddy_v1.0.0_linux_amd64-local net https-test-by-Centos7-WindowsNetworkShare tls self_signed

caddy_v1.0.0_linux_amd64-local-https-test-by-Centos7-WindowsNetworkShare

 

Suppose

1. Do NOT have official domain DNS name 

2. Test HTTPS in local by caddy

3. Windows PC has shared network/192.168.137.0


Windows/network share ========> 192.168.137.0  ============>  Centos7/192.168.137.170(caddy web server)  local name:DESKTOP-P55Q2H7.mshome.net

C:\ping  DESKTOP-P55Q2H7.mshome.net
正在 Ping DESKTOP-P55Q2H7.mshome.net [192.168.137.172] 具有 32 字節的數據:
來自 192.168.137.172 的回覆: 字節=32 時間<1ms TTL=64
來自 192.168.137.172 的回覆: 字節=32 時間<1ms TTL=64


### Centos7/caddy_v1.0.0_linux_amd64

[lake@DESKTOP-P55Q2H7 caddy_v1.0.0_linux_amd64]$ nslookup
> DESKTOP-P55Q2H7.mshome.net
Server:         192.168.137.1
Address:        192.168.137.1#53

Non-authoritative answer:
Name:   DESKTOP-P55Q2H7.mshome.net
Address: 192.168.137.172
>
 

[lake@DESKTOP-P55Q2H7 caddy_v1.0.0_linux_amd64]$ uname -a
Linux DESKTOP-P55Q2H7.mshome.net 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[lake@DESKTOP-P55Q2H7 caddy_v1.0.0_linux_amd64]$ ifconfig   enp4s0
enp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.137.172  netmask 255.255.255.0  broadcast 192.168.137.255
        inet6 fe80::2d89:26b8:f0c2:e190  prefixlen 64  scopeid 0x20<link>
        ether e0:d5:5e:a4:be:ed  txqueuelen 1000  (Ethernet)
        RX packets 4639  bytes 427568 (417.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2610  bytes 560371 (547.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[lake@DESKTOP-P55Q2H7 caddy_v1.0.0_linux_amd64]$ hostname
DESKTOP-P55Q2H7.mshome.net
[lake@DESKTOP-P55Q2H7 caddy_v1.0.0_linux_amd64]$ cat index.html
hello world

[lake@DESKTOP-P55Q2H7 caddy_v1.0.0_linux_amd64]$ cat  Caddyfile
#localhost   ###  Need a DNS name 
DESKTOP-P55Q2H7.mshome.net
{
gzip
tls self_signed
}

[lake@DESKTOP-P55Q2H7 caddy_v1.0.0_linux_amd64]$ ./caddy
Activating privacy features... done.

Serving HTTPS on port 2015
https://desktop-p55q2h7.mshome.net:2015

WARNING: File descriptor limit 1024 is too low for production servers. At least 8192 is recommended. Fix with `ulimit -n 8192`.

### Visit from Windows 
Chrome =>   https://desktop-p55q2h7.mshome.net:2015/


F12/Chrome log 

Documentdesktop-p55q2h7.mshome.net    
1 requests
171 B transferred
12 B resources
Finish: 19 ms
DOMContentLoaded: 72 ms
Load: 99 ms
Request URL: https://desktop-p55q2h7.mshome.net:2015/
Request Method: GET
Status Code: 200 
Remote Address: 192.168.137.172:2015
Referrer Policy: no-referrer-when-downgrade
accept-ranges: bytes
content-encoding: gzip
content-length: 36
content-type: text/html; charset=utf-8
date: Wed, 17 Jun 2020 04:12:55 GMT
etag: W/"qc0fs5c"
last-modified: Tue, 16 Jun 2020 08:33:41 GMT
server: Caddy
status: 200
vary: Accept-Encoding
:authority: desktop-p55q2h7.mshome.net:2015
:method: GET
:path: /
:scheme: https
accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
accept-encoding: gzip, deflate, br
accept-language: en-US,en;q=0.9
cache-control: max-age=0
sec-fetch-dest: document
sec-fetch-mode: navigate
sec-fetch-site: none
sec-fetch-user: ?1
upgrade-insecure-requests: 1
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章