読者です 読者をやめる 読者になる 読者になる

会社を辞めたスライム先生

転職活動しつつ趣味で何か作るよ

動的画像生成サーバーを構築する

メモ

apt-get install -y build-essential vim git-core curl imagemagick libmagickwand-dev libimlib2-dev libgd2-noxpm-dev libssl-dev libxml2-dev libxslt1-dev python-dev
cd /usr/local/src/
git clone https://github.com/cubicdaiya/ngx_small_light.git
cd ngx_small_light/
./setup --with-gd --with-imlib2
cd ../
wget http://nginx.org/download/nginx-1.8.0.tar.gz
tar zxf nginx-1.8.0.tar.gz
cd nginx-1.8.0/
./configure --add-module=../ngx_small_light --with-debug --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_addition_module --with-http_dav_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_spdy_module --with-http_sub_module --with-http_xslt_module --with-mail --with-mail_ssl_module
make
make install
wget https://raw.githubusercontent.com/JasonGiedymin/nginx-init-ubuntu/master/nginx -O /etc/init.d/nginx

chmod +x /etc/init.d/nginx
sudo update-rc.d -f nginx defaults

mkdir /var/cache/nginx
vim /usr/local/nginx/conf/nginx.conf

ここまでがNginxのインストール

 

ここからがHTTPSの設定

cd /usr/local/
git clone https://github.com/letsencrypt/letsencrypt.git
crontab -e

/usr/local/letsencrypt/letsencrypt-auto certonly --webroot -w /var/www -d ドメイン.com --renew-by-default && /usr/sbin/service nginx reloa