目录

一、部署nginx及ssl

二、nginx接入supervisor


一、部署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

GitHub 加速计划 / li / linux-dash
13
2
下载
A beautiful web dashboard for Linux
最近提交(Master分支:4 个月前 )
186a802e added ecosystem file for PM2 5 年前
5def40a3 Add host customization support for the NodeJS version 5 年前
Logo

AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。

更多推荐