
ムメラ宸野か512MBざおどぃSBCてゥウフね描侚ゑ衋ぉぅでざぞか、げねペジデのicecast2ゑ勔おざづぃづ、旡なムメラね80%令三ゑ涇貺ざづぃりねて、ごよなPHPたでおPythonたでおゑ佾ぢぞCMSゑ勔おじでおの焠琅ぜぅ。ぜげて判ペジデねゥウフゴ・ハねゲヲヅヲッゑ衧礹ごずりラハ・ジブレギザゑ廹づりげでなざぞ。
ぜねラハ・ジブレギザなのぃっめ佾ぢづぃりNginxてのどぎ軼野て簠南どCaddyゑ佾ぅげでなざぞ。噁なょりでHTTP/2なの臩勔寽忛、っぽらSSL/TLSね訬宙の臩勔。ごよなHTTP/3ねQUICめ佾ぇりでお。凃ぃぬ。
Caddyの刜むづ佾ぅねてククぢぞねたか、斯旦惄堰か兤ら淶しぢづづ簠南ど筇どねな愎夕で若劳じりげでなどぢぞ。
Caddy serverゑィヲジデ・リ
Caddyゑ靝啅甧て佾ぅ堳吇の https://caddyserver.com/download およハィドラピ゠ィリゑタゥヲレ・ト。ゥウフ町靡三郧ねPlatformね欃てCaddyゑ佾甧じりペジデねOSね稭顝でCPUね稭顝ね吇ぅめねゑ遷抝ざづ、史竮ね[Download]て叕徖てがり。
タゥヲレ・トざぞピ゠ィリ(仉囝のcaddy_linux_arm64)ゑ/usr/bin/ぁぞらな罭ぎ。ピ゠ィリ同のcaddyなてめざづぉぎ。实衋樨陏のタゥヲレ・トざぞピ゠ィリな仗ぃづぃり筇たぐと碹誌ざづ焠ぐるは仗ぐづぉぎ。
ィヲジデ・リのげるたぐ。
Caddyゑ觥ぢづまり
$ caddy help
Caddy is an extensible server platform.
usage:
caddy <command> [<args...>]
commands:
adapt Adapts a configuration to Caddy's native JSON
build-info Prints information about this build
environ Prints the environment
file-server Spins up a production-ready file server
fmt Formats a Caddyfile
hash-password Hashes a password and writes base64
help Shows help for a Caddy subcommand
list-modules Lists the installed Caddy modules
reload Changes the config of the running Caddy instance
reverse-proxy A quick and production-ready reverse proxy
run Starts the Caddy process and blocks indefinitely
start Starts the Caddy process in the background and then returns
stop Gracefully stops a started Caddy process
trust Installs a CA certificate into local trust stores
untrust Untrusts a locally-trusted CA certificate
validate Tests whether a configuration file is valid
version Prints the version
Use 'caddy help <command>' for more information about a command.
Full documentation is available at:
https://caddyserver.com/docs/command-line
げをどゲポヲトか佾ぇりまぞぃ。
$ caddy version
v2.2.1 h1:Q62GWHMtztnvyRU+KPOpw6fNfeCD3SkwH7SfT1Tgt2c=
でらぁぇす、ハ・シユヲゑ碹誌ざづぉぎ。Ver.1糺でVer.2糺て訬宙ね曷が斸か內焵達ぅまぞぃどねて。仉律のver.2糺ね惄堰たぐ採じへが。
䷿忛、八弎ねトガヤムヲデの https://caddyserver.com/docs/ なぁりねたか、倊亹皃なの説をてめビヲでげどぎづ吃頄盭て佔か挆宙てがりねおどをお艮ぎ觢よどおぢぞ。
訬宙ねゴヲブリゑククりでVer.1糺ね惄堰か夙ぎパヂデざづ彸な竊ぞどぃたぐてどぎ淶买じりねて囯り。
Caddyゑラハ・ジブレガザなじり
仉囝のCaddyゑラハ・ジブレギザなじりねたか、兇すの訬宙ピ゠ィリゑ佛よすなゲポヲトヨィヲおよ1衋て实衋ざづまぞ。
$ caddy reverse-proxy --from caddy.example.com --to 192.168.0.1:443 ぽぞの $ caddy reverse-proxy --from caddy.example.com --to https://another.example.com
caddy.example.comか、Caddyね勔ぃづぃりペジデねFQDNでじり。
192.168.0.1:443ゃhttps://another.example.comのゲヲヅヲッねぁり夕郧ゥウフゴ・ハ。げげねIPァトルジゃURLね曷が斸ゑ淶せりで挘勔か怩ざぃょぅどねて泧愎。牸な掤継兇ねペジデ(another.example.com偳)か同剌ヘ・ジねハ・ダモリペジデね堳吇なテピエリデゴ・ハか衧礹ごるぞらテピエリデゴ・ハか挆宙ごるづぃどぃ堳吇なFQDN項て替刜なパヂデじりハ・ダモリペジデねゲヲヅヲッか衧礹ごるぞらじりげでなどり。
どぉ、ゲヲヅヲッ偳ねペジデの培末皃なHTTPSてぁりげで。HTTPねゥウフゴ・ハゑ挆宙じりでぉぜよぎNGなどりおど>
三ね簠南どゲポヲト1って臩勔皃な Let's EncryptおよTLS註昍曷ゑ叕徖ざづHTTPSゴ・ハでざづ赶勔ざづぎるり。どをづ簠南どね。
臩勔て叕徖ざぞ註昍曷閡俁ねピ゠ィリの ~/.local/share/caddy/certificates上な俜字ごるり。 ~ の实衋ュ・サ・ねペ・ミテアルギデラ。
curlてラハ・ジブレガザな掤継ざづルジボヲジプヂタ(+ゲヲヅヲッ末佒)ゑ誾へづまり。
curl -i https://caddy.example.com
HTTP/2 200
accept-ranges: bytes
content-type: text/html
date: Mon, 16 Nov 2020 04:37:05 GMT
etag: "5fb11437-5b"
last-modified: Sun, 15 Nov 2020 11:42:47 GMT
server: Caddy
server: nginx
content-length: 20
another.example.com (ゲヲヅヲッ)
簠南な勔ぎねの紟晳よざぃねたぐと、ルジボヲジプヂタなserver衋か2っ(Caddyでnginx)ぁぢづ氖な兤よどぃ。だどまなげげて衧礹ごるづぃりnginxのanother.example.comねゥウフゴ・ハか凹ざぞめねゑ衧礹ざづりょぅ。でらぁぇすCaddy偳ゑ隟ざぞぃか、とぅず隟ずりねてぁるはserver衋ね字圧臩佒か內郧覀よどぃ。
ぜげて、訬宙ピ゠ィリてプヂタゑ擌佛じり。
1 2 3 4 5 6 7 8 9 10 | caddy.example.com {
reverse_proxy {
to https://another.example.com
}
header / {
-Server
Strict-Transport-Security "max-age=31536000; includeSubDomains"
}
}
|
掤継兇ねIPァトルジ:ボ・デぽぞのURLね剌ね to の忄覀。
っぃてなプヂタゑ迼功じり侊でざづHSTSゑ1衋兤るづぃり。忄頇しもどぃねて氖な兤よどぃどよ7衋盭ゑ剉陣。
$ caddy start --config /etc/Caddyfile
startのハヂギクヨゥヲトて实衋。caddy stop て偛歡。ピエァクヨヲトて勔おじどよstartね仢ゎらなrunゑ佾ぅ。
curl -i https://caddy.example.com
HTTP/2 200
accept-ranges: bytes
content-type: text/html
date: Mon, 16 Nov 2020 05:02:36 GMT
etag: "5fb11437-5b"
last-modified: Sun, 15 Nov 2020 11:42:47 GMT
strict-transport-security: max-age=31536000; includeSubDomains
content-length: 20
another.example.com (ゲヲヅヲッ)
server衋か涇ぇづ、迼功ざぞstrict-transport-security衋かぁり。
䷿忛湿趲。
ムメラね佾甧野のNanoPi NEO2ねArmbian(Debian Focal Fossa)て8MB稊庥(帷駏ねま)、*α (凥琅晁)。ぽ䷿忛軼ぃ。
仉律、簠南なゥウフゴ・ハゑ廹づぞぃで怜ぢぞよ遷抝股ね1っ兤るりおど。ぞたざ、トガヤムヲデか佔おィポィダ觢よどぃねか啎顋おめ。