A
A
Anton2016-04-03 12:13:39
Apache HTTP Server
Anton, 2016-04-03 12:13:39

How to solve mod_status connection problem on Apache?

Raised a web server on a VPS using CP Vesta.
OS: Debian 7
Version of apache: Apache/2.2.22 (Debian)
There is one site running on the server - CMS PrestaShop 1.6.1.4
I didn't attach a domain - I'm working by IP
I can't connect mod_status to Apache.
I surfed the whole Internet, tried a bunch of guides - nothing works (
I tried to figure it out myself - I didn’t figure it out.
Maybe one of you can tell me what the reason is, but for now I’ll start with the basics:
Apache config /etc/apache2/apache2.conf :

# It is split into several files forming the configuration hierarchy outlined
# below, all located in the /etc/apache2/ directory:
#
#       /etc/apache2/
#       |-- apache2.conf
#       |       `--  ports.conf
#       |-- mods-enabled
#       |       |-- *.load
#       |       `-- *.conf
#       |-- conf.d
#       |       `-- *

# Global configuration
LockFile ${APACHE_LOCK_DIR}/accept.lock
PidFile ${APACHE_PID_FILE}
Timeout 30
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 20

<IfModule mpm_prefork_module>
    StartServers          3
    MinSpareServers       3
    MaxSpareServers       9
    ServerLimit         256
    MaxClients           20
    MaxRequestsPerChild 3000
</IfModule>

<IfModule mpm_worker_module>
    StartServers          2
    MinSpareThreads      25
    MaxSpareThreads      75
    ThreadLimit          64
    ThreadsPerChild      25
    MaxClients          200
    MaxRequestsPerChild 4000
</IfModule>

<IfModule mpm_event_module>
    StartServers          2
    MinSpareThreads      25
    MaxSpareThreads      75
    ThreadLimit          64
    ThreadsPerChild      25
    MaxClients          200
    MaxRequestsPerChild 4000
</IfModule>

# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
#User www-data
#Group www-data

AccessFileName .htaccess

<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy all
</Files>

DefaultType None
HostnameLookups Off

ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn

# Include module configuration:
Include mods-enabled/*.load
Include mods-enabled/*.conf

# Include list of ports to listen on and which to use for name based vhosts
Include ports.conf

LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
LogFormat "%b" bytes

Include conf.d/

Launching the loaded status mod: /etc/apache2/mods-enabled/status.load
LoadModule status_module /usr/lib/apache2/modules/mod_status.so

Status mod config: /etc/apache2/mods-enabled/status.conf
<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from all
</Location>

ExtendedStatus On

When executing the command: /usr/sbin/a2enmod status writes
Module status already enabled
If we run the command: apachectl -l we will see that apache did not compile with our mod:
Compiled in modules:
  core.c
  mod_log_config.c
  mod_logio.c
  mod_version.c
  prefork.c
  http_core.c
  mod_so.c

Where else to pick I do not know. I probably won't be able to figure it out on my own.
Pis everyone ;)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel Galkin, 2016-04-04
@dudilona

Inventors and dreamers, by God :)
https://forum.vestacp.com/viewtopic.php?f=29&t=110...

N
neol, 2016-04-03
@neol

apachectl -l
shows a list of modules included during compilation, and your mod_status is loaded dynamically. Accordingly, you need to look like this:
apachectl -t -D DUMP_MODULES

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question