linux:nginx
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン | |||
linux:nginx [2024/02/01 12:04] – mikoto | linux:nginx [2025/02/20 15:37] (現在) – mikoto | ||
---|---|---|---|
行 1: | 行 1: | ||
====== NginxによるWebサーバー構築 ====== | ====== NginxによるWebサーバー構築 ====== | ||
[[: | [[: | ||
+ | |||
+ | ===== インストール ===== | ||
+ | まずはdnfモジュールを検索する。 | ||
+ | <code bash> | ||
+ | dnf module list nginx | ||
+ | </ | ||
+ | |||
+ | dnfモジュールをインストールする。 | ||
+ | <code bash> | ||
+ | dnf module install nginx:1.20 | ||
+ | </ | ||
+ | |||
===== リバースプロキシ設定 ===== | ===== リバースプロキシ設定 ===== | ||
+ | |||
+ | リバースプロキシを設定するには、 | ||
+ | / | ||
+ | < | ||
+ | server { | ||
+ | listen 443 ssl; | ||
+ | server_name host.example.com; | ||
+ | |||
+ | ssl_certificate / | ||
+ | ssl_certificate_key / | ||
+ | |||
+ | ssl_protocols TLSv1.2 TLSv1.3; | ||
+ | ssl_ciphers HIGH: | ||
+ | ssl_prefer_server_ciphers on; | ||
+ | |||
+ | location / { | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | proxy_set_header X-Forwarded-For | ||
+ | proxy_pass http:// | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
===== SSL化設定 ====== | ===== SSL化設定 ====== | ||
''/ | ''/ |
linux/nginx.1706756671.txt.gz · 最終更新: 2024/02/01 12:04 by mikoto