Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

667
Views
Is there a way to resolve an issue with nginx status Active: inactive (dead) problem in CENTOS

This is what it brings when you check nginx status

[root@ttproxyapp conf.d]# service nginx status
Redirecting to /bin/systemctl status nginx.service
● nginx.service - nginx - high performance web server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

sudo systemctl stop apache2
sudo systemctl start nginx

should work since looks like the port is in use (with apache probably)

over 4 years ago · Santiago Trujillo Report

0

there is maybe an apache server running. you must stop that apache server order run the Nginx server.

sudo systemctl stop apache2

sudo systemctl start nginx

over 4 years ago · Santiago Trujillo Report

0

It realy looks like your NGINX ins't running. nginx -s reload is just working if there is a running instance and therfore a PID-file.

Please check the result of the following command.

[root@localhost conf.d]# sudo ps -elf | grep nginx

Should be something like

1 S root      88262      1  0  80   0 - 13143 sigsus 23:47 ?        00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
5 S nginx     88263  88262  0  80   0 - 13257 ep_pol 23:47 ?        00:00:00 nginx: worker process
0 R root      88265  69227  0  80   0 - 28178 -      23:47 pts/1    00:00:00 grep --color=auto nginx

You need at least! the master process and the worker process! If there is no process start your instance by typing

sudo /bin/systemctl start nginx.service OR sudo service nginx start

Check your processlist after running the command.

After you have started the NGINX service there should be PID-file located at /var/run/nginx.pid and sudo systemctl status nginx.service should printout something like

[root@localhost conf.d]# systemctl status nginx.service
● nginx.service - NGINX Plus - high performance web server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2020-03-14 23:47:13 EDT; 5min ago
     Docs: https://www.nginx.com/resources/
  Process: 88232 ExecStop=/bin/kill -s TERM $MAINPID (code=exited, status=0/SUCCESS)
  Process: 88260 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=0/SUCCESS)
  Process: 88251 ExecStartPre=/usr/libexec/nginx-plus/check-subscription (code=exited, status=0/SUCCESS)
 Main PID: 88262 (nginx)
    Tasks: 2
   Memory: 1.7M
   CGroup: /system.slice/nginx.service
           ├─88262 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
           └─88263 nginx: worker process

Mar 14 23:47:13 localhost.localdomain systemd[1]: Starting NGINX Plus - high performance web server...
Mar 14 23:47:13 localhost.localdomain systemd[1]: Can't open PID file /var/run/nginx.pid (yet?) after start: No such file or directory
Mar 14 23:47:13 localhost.localdomain systemd[1]: Started NGINX Plus - high performance web server.

I am running NGINX Plus but it doesn't matter in this case.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!