NginxをCentOS7に入れてみた
Nginx導入
起動
- sudo nginx
自動起動を有効にしとく
- $ sudo chkconfig nginx on
接続確認
firewalld停止
# systemctl stop firewalld
firewalldのステータス
# systemctl status firewalld
firewalld自動起動停止
# systemctl disable firewalld
設定確認
# systemctl is-enabled firewalld disabled
ブラウザで確認
- 192.168.33.10でテストページが写っていれば成功
おまけ:confの場所
- nginxのconf は下記のディレクトリ以下
- /etc/nginx/
おmけ:デフォルトのドキュメントルート
/etc/nginx/conf.d/default.conf location / { root /usr/share/nginx/html; index index.html index.htm; }