#author("2020-08-05T05:05:36+00:00","default:wikiwriter","wikiwriter") &tag(CentOS8/Nginx); *目次 [#r490b78e] #contents *関連ページ [#e72d4cf7] *参考情報 [#g7e93d6e] -[[CentOS 8にNginx 1.16をインストール(AppStream) - Qiita:https://qiita.com/witchcraze/items/7ff13f2bb90667b6b954]] *インストール [#o0c1b593] -デフォルトは 1.14? # dnf install @nginx -開始して自動起動 #pre{{ # systemctl start nginx # systemctl enable nginx }} *設定 [#i8fa55e6] **シンプルな設定 [#i2526d37] -DocumentRootだけ指定して8080ポートを使用。 -/etc/nginx/conf.d/default.confを作成。 #pre{{ server { listen 8080; index index.php; root /home/sora/public_html; }} -8080ポートでfirewalldを通す firewall-cmd --zone=public --add-port=8080/tcp --permanent **phpを動かす [#sd3d3c33] -php-fpmのインストール。[[CentOS 8 にPHP7.4をDNFでインストール | 株式会社オルタ:https://aulta.co.jp/archives/7697]] -標準だとPHP 7.2なので7.4を入れる。 dnf module reset php dnf install @php:remi-7.4