Centos 7 에서 openresty 자동 시작 설정

더 읽 기
vi /usr/lib/systemd/system/nginx.service
[Service]
Type=forking
PIDFile=/usr/local/openresty/nginx/logs/nginx.pid
ExecStartPre=/usr/local/openresty/nginx/sbin/nginx -t
ExecStart=/usr/local/openresty/nginx/sbin/nginx
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true

[Install]
WantedBy=multi-user.target

systemctl daemon-reload
systemctl enable nginx.service
systemctl start nginx.service

좋은 웹페이지 즐겨찾기