Raspberry Pi に nginx1.8 インストール

sweep3092.hatenablog.com

raspipy.blog.fc2.com

sudo su -
echo 'deb-src http://nginx.org/packages/debian/ jessie nginx' >> /etc/apt/sources.list
wget http://nginx.org/keys/nginx_signing.key -O - | apt-key add -
wget http://nginx.org/keys/nginx_signing.key -O - | gpg --no-default-keyring --keyring ~/.gnupg/trustedkeys.gpg --import -

apt-get update
apt-get -y build-dep nginx
apt-get source nginx


cd nginx-*
dpkg-buildpackage -uc -b
cd ..


dpkg -i nginx_*~jessie_armhf.deb

ドキュメントルート変更

nginx -V

$ sudo service nginx stop

$ sudo nano /etc/nginx/conf.d/default.conf

    location / {
        root   /var/www/html;
        index  index.html index.htm;
    }

$ sudo service nginx start