How do I access server-status on MacOS X Lion?

1,267

Solution 1

In order to handle requests to /server-status with mod_status, you will need the following lines somewhere in your configuration:

<Location /server-status>
  SetHandler server-status
</Location>

Don't forget to restrict access to localhost or other trusted hosts using Allow/Deny or the newer Require directives.

Solution 2

This is the solution if you are running Mac OS X 10.11 El Capitan. Note: You need administrator privileges. (sudo)

  • In your /etc/apache2/httpd.conf uncomment these lines
    • Line 153: LoadModule status_module libexec/apache2/mod_status.so
    • Line 497: Include /private/etc/apache2/extra/httpd-info.conf
  • Now open /etc/apache2/extra/httpd-info.conf and change lines 14-18 to
    • <Location /server-status> SetHandler server-status Require host localhost </Location>

Now you can open the URL http://localhost/server-status with your web browser and see the apache status.

For a "fullstatus" place the text ExtendedStatus On within /etc/apache2/extra/httpd-info.conf right before the <Location /server-status> line.

Share:
1,267
itsAdzy
Author by

itsAdzy

Updated on September 18, 2022

Comments

  • itsAdzy
    itsAdzy over 1 year

    Basically I currently have a search bar that works using a .keyup() function and the correct row/s are returned and the others hidden as the user enters a value. I am trying to learn how to do this (using .click() but my jQuery/javascript knowledge isn't too strong). Can someone help me adapt my current function to work so that the contents of the search bar is only used to search the table when the search button is clicked and not as a user is typing. Thanks a lot in advance.

    HTML:

            <h2>Customer Data</h2>
    
            <p>Below shows all the relevant customer data, rows can be edited, added, removed and moved up and down in the table.</p> 
            <div id="table" class="table-editable"  style="width:1000px; text-align: left;">
                    <span class="table-add glyphicon glyphicon-plus"></span>
                    <table class="table">
                <thread>
                    <tr>
                        <th width="300">Customer Name</th>
                        <th width="250">Postcode</th>
                    <th width="200">Telephone No</th>
                        <th width="150">Remove</th>
                        <th width="100">Adjust Row</th>
                    </tr>
                </thread>
                <tbody>
                    <tr>
                        <td width="300"><div contenteditable>Adam Greenwood</div>
                        <td width="250"><div contenteditable>GU17 0DL</div>
                    <td width="200"><div contenteditable>01252445567</div>
                    <td width="150">
                        <span class="table-remove glyphicon glyphicon-remove"></span>
                    </td>
                    <td width="100>
                        <span class="table-up glyphicon glyphicon-arrow-up"></span>
                        <span class="table-down glyphicon glyphicon-arrow-down"></span>
                    </td>
                    </tr>
                <tr>
                        <td width="300"><div contenteditable>Sam Test</div>
                        <td width="250"><div contenteditable>GU47 7GR</div>
                    <td width="200"><div contenteditable>01276122047</div>
                    <td width="150">
                        <span class="table-remove glyphicon glyphicon-remove"></span>
                    </td>
                    <td width="100">
                        <span class="table-up glyphicon glyphicon-arrow-up"></span>
                        <span class="table-down glyphicon glyphicon-arrow-down"></span>
                    </td>
                    </tr>
                <tr>
                        <td width="300"><div contenteditable>Mark Colin</div>
                        <td width="250"><div contenteditable>YA32 3DM</div>
                    <td width="200"><div contenteditable>44+7449929147</div>
                    <td width="150">
                        <span class="table-remove glyphicon glyphicon-remove"></span>
                    </td>
                    <td width="100">
                        <span class="table-up glyphicon glyphicon-arrow-up"></span>
                        <span class="table-down glyphicon glyphicon-arrow-down"></span>
                    </td>
                    </tr>
                <tr>
                        <td width="300"><div contenteditable>Frank Wright</div>
                        <td width="250"><div contenteditable>SF65 7YY</div>
                    <td width="200"><div contenteditable>00866451340</div>
                    <td width="150">
                        <span class="table-remove glyphicon glyphicon-remove"></span>
                    </td>
                    <td width="100">
                        <span class="table-up glyphicon glyphicon-arrow-up"></span>
                        <span class="table-down glyphicon glyphicon-arrow-down"></span>
                    </td>
                    </tr>
                <tr>
                        <td width="300"><div contenteditable>Arnold Carrol</div>
                        <td width="250"><div contenteditable>LE22 2WQ</div>
                    <td width="200"><div contenteditable>05429552095</div>
                    <td width="150">
                        <span class="table-remove glyphicon glyphicon-remove"></span>
                    </td>
                    <td width="100">
                        <span class="table-up glyphicon glyphicon-arrow-up"></span>
                        <span class="table-down glyphicon glyphicon-arrow-down"></span>
                    </td>
                    </tr>
                <tr>
                        <td width="300"><div contenteditable>Thomas Gallagher</div>
                        <td width="250"><div contenteditable>YL66 7FF</div>
                    <td width="200"><div contenteditable>94232520682</div>
                    <td width="150">
                        <span class="table-remove glyphicon glyphicon-remove"></span>
                    </td>
                    <td width="100">
                        <span class="table-up glyphicon glyphicon-arrow-up"></span>
                        <span class="table-down glyphicon glyphicon-arrow-down"></span>
                    </td>
                    </tr>
                <tr>
                        <td width="300"><div contenteditable>Stephen Major</div>
                        <td width="250"><div contenteditable>SA12 6TG</div>
                    <td width="200"><div contenteditable>54295650429</div>
                    <td width="150">
                        <span class="table-remove glyphicon glyphicon-remove"></span>
                    </td>
                    <td width="100">
                        <span class="table-up glyphicon glyphicon-arrow-up"></span>
                        <span class="table-down glyphicon glyphicon-arrow-down"></span>
                    </td>
                    </tr>
                <tr>
                        <td width="300"><div contenteditable>Neil Reynolds</div>
                        <td width="250"><div contenteditable>MU70 6XC</div>
                    <td width="200"><div contenteditable>40768991327</div>
                    <td width="150">
                        <span class="table-remove glyphicon glyphicon-remove"></span>
                    </td>
                    <td width="100">
                        <span class="table-up glyphicon glyphicon-arrow-up"></span>
                        <span class="table-down glyphicon glyphicon-arrow-down"></span>
                    </td>
                    </tr>
                <tr>
                        <td width="300"><div contenteditable>Jeff Reinbold</div>
                        <td width="250"><div contenteditable>RG10 7HM</div>
                    <td width="200"><div contenteditable>01865439</div>
                    <td width="150">
                        <span class="table-remove glyphicon glyphicon-remove"></span>
                    </td>
                    <td width="100">
                        <span class="table-up glyphicon glyphicon-arrow-up"></span>
                        <span class="table-down glyphicon glyphicon-arrow-down"></span>
                    </td>
                    </tr>
                    <!-- This is our clonable table line -->
                    <tr class="hide">
                        <td width="300"><div contenteditable>Empty</div>
                        <td width="250"><div contenteditable>Empty</div>
                    <td width="200"><div contenteditable>Empty</div>
                        <td width="150"><span class="table-remove glyphicon glyphicon-remove"></span></td>
                        <td width="100"><span class="table-up glyphicon glyphicon-arrow-up"></span>
                        <span class="table-down glyphicon glyphicon-arrow-down"></span>
                        </td>
                    </tr>
                </tbody>
                    </table>
                <input type="text" id="search" placeholder="Type to search..." />
                <br />
                <br />
                <button>Search</button>
            </div>
    

    Search Function:

    <script>
            $("#search").keyup(function(){
                    _this = this;
    
                    $.each($("#table tbody tr"), function() {
    
                        if($(this).text().toLowerCase().indexOf($(_this).val().toLowerCase()) === -1)
                            $(this).hide();
                        else
                            $(this).show();                
                    });
                }); 
            </script> 
    
  • yuriy636
    yuriy636 over 7 years
    Don't forget to explain a bit the changes you've done in the code.