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

how to solve: nginx Permission denied problem

  *71 connect() to unix:/run/php/php7.4-fpm.sock failed (13: Permission denied) while connecting to upstream, client: <ip here>, server:  <ip here>, request: "GET /iomad/ HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "<ip here>" just give permission  to  php7.4-fpm.sock i solved it by giving sudo chmod -R 0777     php7.4-fpm.sock Also i tried to open the file but there was again permission denied issue  i visited my website and it was working

Indian HAL Tejas | Touch The Sky With Glory | ShotOnNikonD3500

Indian HAL Tejas | Touch The Sky With Glory | ShotOnNikonD3500

installing Laravel v8.0.1 in Windows 10 Pro x64bit

 Using WAMP for  php - 7.4.10 maraiadb - 10 apache - 2.4 php -i | grep -i ssl  to check registration stream socket transports grep -R "search your word" use this cmd to search in linux directory composer diagnose to see the status of composer check with this link also:  https://github.com/composer/composer/issues/4388 Failed to download tijsverkoyen/css-to-inline-styles from dist: The "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/b43b05cf43c1b6d849478965062b6ef73e223bb5" file could not be downloaded: php_network_getaddresses: getaddrinfo failed: No such host is known.     failed to open stream: php_network_getaddresses: getaddrinfo  failed: No such host is known.  Now trying to download from source https://github.com/tijsverkoyen/CssToInlineStyles   install the  composer require tijsverkoyen/css-to-inline-styles ======================================================================= These are final steps: ...