Skip to main content

check status of nginx

 sudo nginx -t -c /etc/nginx/nginx.conf 

1. it'll tell error logs 

2. suspicious symbols left in sites-available or sites-enabled 


to restart nginx-====


user@linux:/etc/nginx/sites-enabled$ systemctl status nginx  

  ● nginx.service - A high performance web server and a reverse proxy server                                              Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)                               Active: failed (Result: exit-code) since <date & time here >    

  Docs: man:nginx(8)                                                                                                                                           Process: 5636 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)         

        Process: 11109 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)

     Main PID: 16769 (code=exited, status=0/SUCCESS)                                                                                                                                                                                                                                                       <date & time here> linux systemd[1]: Starting A high performance web server and a reverse proxy server...       

    <date & time here> linux nginx[11109]: nginx: [warn] server name "(localhost/ip)" has suspicious symbols in /etc/nginx/sites-enabled/iomad:1 

   <date & time here> linux nginx[11109]: nginx: [emerg] unexpected end of file, expecting "}" in /etc/nginx/sites-enabled/(your-website):2          

   <date & time here> linux nginx[11109]: nginx: configuration file /etc/nginx/nginx.conf test failed                                             

 <date & time here> linux systemd[1]: nginx.service: Control process exited, code=exited status=1                  

   <date & time here> linux systemd[1]: nginx.service: Failed with result 'exit-code'.                         

   <date & time here> linux systemd[1]: Failed to start A high performance web server and a reverse proxy server. 

 user@linux:/etc/nginx/sites-enabled$ systemctl start nginx 

  ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===                                        Authentication is required to start 'nginx.service'.                                                                                         Authenticating as: server (user)                                                                                                             Password:                                                                                                                                                       ==== AUTHENTICATION COMPLETE === 


Comments

Popular posts from this blog

GraphQL vs REST

  GraphQL   GraphQL is an application layer server-side technology which is developed by Facebook for executing queries with existing data. GraphQL can optimize RESTful API calls. It gives a declarative way of fetching and updating your data. GraphQL helps you to load data from server to client. It enables programmers to choose the types of requests they want to make. REST REST is a software architectural style that defines a set of constraints for creating web services. It is designed specifically for working with media components, files, or hardware device. The full form of REST is Representational State Transfer. ========================================================= Here is the important difference between GraphQL and REST. GraphQL REST GraphQL is an application layer server-side technology which is developed by Facebook for executing queries with existing data. REST is a software architectural style that defines a set of constraints for creating Web services. It follow...

Angular 16 Released

 check out these videos:

Competitor or Alternative of IDM (Internet Download Manager) 🤔

  Yes you heard right, a perfect competitor and alternative of IDM (Internet Download Manager) that helps you to get links from Torrent download, YouTube videos and many more. I was really fan of IDM (Internet Download Manager). I always use genuine products for my work and productivity but yes free applications as well 😉😄 mostly. But sometimes laziness and saving money a bit helps too. Problem started when I installed the crack version of IDM and it always prompted to buy/register the product. Although it was a valid reason from their side as well. 😄😄 I started to search and got a free, powerful, best alternative named   EagleGet for Windows  You can download it from Softinic  or Filehippo   I found it very useful in many ways, some of them are faster downloads it can track links and starts downloading as soon you copy  works like a charm, it doesn't integrate videos after downloading finishes (like you can notice in IDM) I think yo...