Conoha VPS Ubuntu16 nginxでwebサーバ
Ubuntu16.04でnginxを起動したメモです。 手順 1.インストール apt install nginx apt install php7.0 apt install php7.0-fpm べつに一行で apt install nginx php7.0 php7.0-fpm でもいいです。 2.設定する サーババージョンを隠蔽 vi /etc/nginx/nginx.conf server_tokens off; サーバ自体の設定は、 基本的な設定 /etc/nginx/nginx.conf デフォルトサーバ vi /etc/nginx/sites-available/default 仮想サーバごと /etc/nginx/conf.d/<ドメイン名>.conf を作成して編集 ・複数ドメインを使わないならたぶん。 /etc/nginx/sites-available/defaultを調整すればいいかと。 以下こまんど 実行する sudo systemctl start nginx.service sudo systemctl start php-fpm.service 自動起動設定 sudo systemctl enable nginx.service sudo systemctl enable php-fpm.service