【服务器部署系列-004】Linux Nginx服务部署及接入supervisor
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash

·
目录
一、部署nginx及ssl
1.部署到 /usr/local 下
cd /usr/local
2.下载nginx1.13.7
wget http://nginx.org/download/nginx-1.13.7.tar.gz
3.文件解压缩
tar zxvf nginx-1.13.7.tar.gz
mkdir -p /usr/local/nginx
4.指定文件夹部署及接入SSL模块(若以后需要接入https,则需要接入,此处选择直接接入模板)
cd nginx-1.13.7/
yum -y install pcre-devel
yum -y install openssl openssl-devel
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
5.部署服务
make
make install
6.创建证书文件夹
mkdir -p /usr/local/nginx/conf/cert
后续ssl证书可配置在cert下,修改nginx相关配置文件以接入ssl
7.启动服务
cd /usr/local/nginx/sbin
./nginx
二、nginx接入supervisor
增加supervisor配置文件
vim /etc/supervisor/conf.d/nginx.conf
[program:nginx]
directory = /usr/local/nginx
command = /usr/local/nginx/sbin/nginx -g 'daemon off;'
autostart=false
autorestart=true
startsecs= 1
startretries= 5
stderr_logfile = /var/log/supervisor/nginx.err.log




A beautiful web dashboard for Linux
最近提交(Master分支:5 个月前 )
186a802e
added ecosystem file for PM2 4 年前
5def40a3
Add host customization support for the NodeJS version 4 年前
更多推荐
所有评论(0)