commit(auto)
This commit is contained in:
parent
510176320a
commit
cf20eef238
1 changed files with 22 additions and 1 deletions
|
@ -47,12 +47,33 @@ $ sudo toucn /etc/caddy/Caddyfile
|
||||||
|
|
||||||
Caddyfileを編集
|
Caddyfileを編集
|
||||||
```
|
```
|
||||||
localhost, 127.0.0.1 saipi4(みなさんのホスト名に変えてください) {
|
localhost, 127.0.0.1 192.168.1.100(自分で決めたIPアドレス) saipi4.local(自分で決めたhostname) {
|
||||||
root * /var/www
|
root * /var/www
|
||||||
file_server
|
file_server
|
||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
/var/wwwにindex.htmlを作成
|
||||||
|
|
||||||
|
```
|
||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>This is the title of the webpage!</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p>All your base are belong to us.</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
```
|
||||||
|
|
||||||
|
caddyを起動
|
||||||
|
```
|
||||||
|
caddy run --config /etc/caddy/Caddyfile
|
||||||
|
```
|
||||||
|
色々怒られるかもだけど、とりあえずネットワーク内から接続できる。
|
||||||
|
|
||||||
|
![[Pasted image 20240205205804.png]]
|
||||||
|
|
||||||
cf.
|
cf.
|
||||||
[GitHub - caddyserver/caddy: Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS](https://github.com/caddyserver/caddy?tab=readme-ov-file#build-from-source)
|
[GitHub - caddyserver/caddy: Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS](https://github.com/caddyserver/caddy?tab=readme-ov-file#build-from-source)
|
||||||
|
|
Loading…
Reference in a new issue