Apache's status related problem solutions

  • 2020-05-13 04:13:17
  • OfStack

Apache /root/lnmpa status problem solving

Master please ignore, small white can be used for reference.

Problem description:

LNMP0.7 after upgrading to LNMPA
Run the command


/root/lnmpa status

An error will appear in Apache's status1 item:


/etc/init.d/httpd: line 112: lynx: command not found

or


Error 403 Access forbidden!

Solutions:
The lynx: command not found error appears, which requires completion of Step1&Step2
Error 403 Access forbidden! Only Step2 needs to be completed for the error

Step1
Install lynx

<p><span style="background-color: rgb(192, 192, 192);">yum install lynx -y</span><br /></p>


Step2
Run the command

<p><span>vi</span><span> </span><span>/</span><span>usr</span><span>/</span><span>local</span><span>/</span><span>apache</span><span>/</span><span>conf</span><span>/</span><span>extra</span><span>/</span><span>httpd</span><span>-</span><span>info</span><span>.conf</span></p>


will

<div id="crayon-500bf6505c39e-1" style=""><span><</span><span>Location</span><span> </span><span>/</span><span>server</span><span>-</span><span>status</span><span>></span> </div><div id="crayon-500bf6505c39e-2" style=""><span>    </span><span>SetHandler </span><span>server</span><span>-</span><span>status </span></div><div id="crayon-500bf6505c39e-3" style=""><span>    </span><span>Order </span><span>deny</span><span>,</span><span>allow </span></div><div id="crayon-500bf6505c39e-4" style=""><span>    </span><span>Deny </span><span>from </span><span>all </span></div><div id="crayon-500bf6505c39e-5" style=""><span>    </span><span>Allow </span><span>from</span><span> </span><span>.example</span><span>.com</span> </div><div id="crayon-500bf6505c39e-6" style=""><span><</span><span>/</span><span>Location</span><span>></span></div>


to

<div id="crayon-500bf6505c41d-1" style=""><span><</span><span>Location</span><span> </span><span>/</span><span>server</span><span>-</span><span>status</span><span>></span> </div><div id="crayon-500bf6505c41d-2" style=""><span>    </span><span>SetHandler </span><span>server</span><span>-</span><span>status </span></div><div id="crayon-500bf6505c41d-3" style=""><span>    </span><span>Order </span><span>deny</span><span>,</span><span>allow </span></div><div id="crayon-500bf6505c41d-4" style=""><span>    </span><span>Deny </span><span>from </span><span>all </span></div><div id="crayon-500bf6505c41d-5" style=""><span>    </span><span>Allow </span><span>from</span><span> </span><span>127.0.0.1</span> </div><div id="crayon-500bf6505c41d-6" style=""><span><</span><span>/</span><span>Location</span><span>></span></div>


Restart Apache

<p><span>service </span><span>httpd </span><span>restart</span></p>


Then use

/root/lnmpa status
or
service httpd status
It is normal to check the Apache status
You can also view it using http://youripordomain/ server-status access via Web


Related articles: