極北別世界通信

極北別世界通信

Nginx リバースプロキシ&SSL設定のTIPS

基本的なインストールやら導入は(暇があったら書きますが)、とりあえずたくさん記事があるので放置して、ハマリかけたとこだけ

SSL設定で

dhparam.pem

がないと怒られる。

# nginx -t
nginx: [emerg] BIO_new_file("/etc/ssl/certs/dhparam.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/ssl/certs/dhparam.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)

まぁネット上のConfigパクってて設定もしてないほうが悪いんですが、Nginxは今のVersionだとdhparam.pemがないといけないらしいので注意。

んで

# openssl dhparam 2048 -out /etc/ssl/certs/dhparam.pem
Generating DH parameters, 2048 bit long safe prime, generator 2

完了まで時間がかかる。

そのあと

# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

正常にとりあえずはなったのでメモ

0