CentOS Stream 9 nginxをインストールする方法
環境
CentOS Stream 9
概要
高速 HTTP/Proxy サーバーソフトウェア [Nginx] (エンジンエックス) による Web サーバーの
インストールと設定です。
操作方法
1.Nginx をインストールします。
# dnf -y install nginx
2.nginx の基本設定を行います
# vi /etc/nginx/nginx.conf
# 41行目 : サーバー名を自身のものに変更
server_name www.test.com;
3.nginxを有効にします。
# systemctl enable --now nginx
4.Firewalld を有効にしている場合は、HTTP サービスの許可が必要です。HTTP は [80/TCP] を使用します。
# firewall-cmd --add-service=http # firewall-cmd --runtime-to-permanent