Case 1: nginx has service
Nginx installed in Linux will register service service by default. You can directly start, stop and restart according to the following operations
service nginx start # start
service nginx stop # stop
service nginx restart # restart
Case 2: the original nginx service is not clear
Find the installation directory of nginx to understand the situation of nginx
# Find Nginx installation information
find/-name nginx
# Go to the nginx sbin directory and restart
. /nginx -s reload
# If you have modified the Nginx configuration, check the configuration with -t
. /nginx -t
# Check to see if it starts
ps aux | grep nginx
# or
ps -ef | grep nginx
Nginx more
Adding prefix to nginx agent of Python flash project
deployment of ngnix + gunicorn + Flash project in Ubuntu environment
Read More:
- Linux Install Docker Error: Failed to restart docker.service: Unit docker.service not found.
- [Solved] Nginx Restart Error: /run/nginx.pid failed (2: No such file or directory)
- Service network restart reported an error and failed to restart [How to Solve]
- [Solved] Service network restart reported an error and failed to restart
- Centos8 Could not restart the Network: Failed to restart network.service: Unit network.service not found
- Nginx Startup Error: Job for nginx.service failed because the control process exited with error code
- Nginx Error: nginx: [emerg] the “ssl“ parameter requires ngx_http_ssl_module in /project/api/nginx.conf:
- Nginx error: nginx: [error] invalid PID number ““ in “/run/nginx.pid“
- Easycvr package Linux version error net_DVR_DownFileByName_Stop
- Nginx Startup Error: “/var/run/nginx/nginx.pid” failed” [How to Solve]
- [Solved] nginx: [error] open() “/usr/local/nginx/nginx.pid” failed (2: No such file or directory)
- Install and start the tftp-server server and possible solutions to Redirecting to /bin/systemctl restart xinetd.service problems
- [Solved] Linux Service Start Error: *.service: Main process exited, code=exited, status=203/EXEC
- Nginx realizes the same background service for portal and business
- [Solved] websocket error in Linux service: / lib64 / libc. So. 6: version ` glibc_2.17‘ not found
- Nginx Error: Swap file “/etc/nginx/.nginx.conf.swp“ already exists
- redhat7. 5 system service is not started automatically and use systemctl start error: error getting authority: error initializing authority: CO, (the server will restart)
- Linux Connect Error: network.service failed [How to Solve]
- Linux system service command error: Failed to allocate directory watch: Too many open files
- Linux Execution Error “service mysqld start“error while loading shared libraries: libaio.so.1“