1.创建nginx.service文件,并编辑
vim /lib/systemd/system/nginx.service
内如如下:
[Unit]
Description=nginx service
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/nginx/sbin/nginx
ExecReload=/usr/local/nginx
1.创建nginx.service文件,并编辑
vim /lib/systemd/system/nginx.service
内如如下:
[Unit]
Description=nginx service
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/nginx/sbin/nginx
ExecReload=/usr/local/nginx