========================================================================================================
Здравствуйте.
Помогите пожалуйста.
Не могу заставить работать модуль mod_status
Делал все по инструкции:
http://goo.gl/aHXt3y и
http://goo.gl/xYPjV3Модуль mod_status установил. Но при выполнении команды
apache2ctl fullstatus или
http://localhost/server-status или
http://ip-адрес сервера/server-status
Всегда пишет одно и то же: 404 Not found Nginx
Интуитивно догадываюсь, что nginx получает запрос но не передает его apache.
Может нужно где то, какой то, порт поменять?
А может, нужно как то, заставить Apache обрабатывать страницу
http://localhost/server-statusминуя nginx.
========================================================================================================
Вот выдержка из моей конфигурации.
ОС Ubuntu 14.04.1 LTS
В качестве Фронт-энд сервера: nginx/1.4.6
/etc/nginx/nginx.conf
Вот пример его конфига:
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
include /etc/nginx/vhosts/*/*;
server {
server_name localhost;
disable_symlinks if_not_owner;
listen 80;
include /etc/nginx/vhosts-includes/*.conf;
location @fallback {
error_log /dev/null crit;
proxy_pass http://127.0.0.1:8080;
proxy_redirect http://127.0.0.1:8080 /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
access_log off ;
}
} # server
}
В качестве Бэк-энд сервера: Apache/2.4.7
/etc/apache2/apache2.conf
Вот пример его конфига:
Mutex file:${APACHE_LOCK_DIR} default
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
# Include module configuration:
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
# Include list of ports to listen on
Include ports.conf
IncludeOptional conf-enabled/*.conf
# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Include conf.d/
Include vhosts-default/
Include vhosts/
# подключаем настройки пхп май админа
Include /etc/phpmyadmin/apache.conf
#NameVirtualHost 127.0.0.1:8080
# Listen: Позволяет привязать Apache к конкретному адресу IP, и/или порту, в
# дополнение к порту, определенному по умолчанию. См. также директиву
# <VirtualHost>.
Listen 127.0.0.1:8080
#NameVirtualHost 127.0.0.1:*
#NameVirtualHost 127.0.0.1:8080
Пример конфигурации одного сайта.
/etc/apache2/vhosts/tfox/mysite.com
<VirtualHost 127.0.0.1:8080>
ServerName mysite.com
<FilesMatch "\.ph(p[3-5]?|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
SetEnvIf Remote_Addr "127\.0\.0\.1" loopback
SetEnvIf Remote_Addr "::1" loopback
CustomLog /var/www/httpd-logs/mysite.com.access.log combined env=!loopback
ErrorLog /var/www/httpd-logs/mysite.com.error.log
</VirtualHost>
<Directory /var/www/tfox/data/www/mysite.com>
php_admin_flag engine on
Options -ExecCGI
</Directory>
Настройки модуля mod_status
<IfModule mod_status.c>
# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
# Uncomment and change the "192.0.2.0/24" to allow access from other hosts.
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from all
#Allow from localhost 127.0.0.1
</Location>
# Keep track of extended status information for each request
ExtendedStatus On
# Determine if mod_status displays the first 63 characters of a request or
# the last 63, assuming the request itself is greater than 63 chars.
# Default: Off
#SeeRequestTail On
<IfModule mod_proxy.c>
# Show Proxy LoadBalancer status in mod_status
ProxyStatus On
</IfModule>
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet