LoginSignup
10
10

More than 5 years have passed since last update.

Cent OSへのNginxインストールと設定

Last updated at Posted at 2015-11-09

検証環境

  • さくらVPS(CentOS release 6.7)

Nginxのインストール

こちらの記事を参照。
CentOSにnginx最新をyumでインストール

Nginxの起動と自動起動設定

Nginxインストールメモ > インストール

Nginxの設定変更

Nginxの設定ファイルは下記ディレクトリに存在する。
/etc/nginx/
このディレクトリに*.confファイルを配置すると、各サーバの設定が可能である。

example.conf
server {
        listen 8080;
        server_name dev.example.com;
        location / {
                root    /home/example/dev;
                index   index.html index.htm index.php;
        }
}
10
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
10