在日志文件中以及当 apachectl restart 显示时:
Warning: DocumentRoot [/home/test/domains/suspended/crm] does not exist
Warning: DocumentRoot [/home/test/domains/suspended/crm] does not exist
httpd.conf:
ServerRoot "/etc/httpd"
Listen 80
#LoadModule dummy_module /usr/lib/apache/mod_dummy.so
Include /etc/httpd/conf/extra/httpd-phpmodules.conf
User apache
Group apache
ServerAdmin admin@localhost
DocumentRoot "/var/www/html"
# Options and AllowOverrides
Include conf/extra/httpd-directories.conf
<IfModule dir_module>
DirectoryIndex index.html index.htm index.shtml index.php index.php5 index.php4 index.php3 index.phtml index.cgi
</IfModule>
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
ErrorLog /var/log/httpd/error_log
LogLevel warn
<IfModule log_config_module>
#replace %b with %O for more accurate logging
<IfModule mod_logio.c>
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%O %I" bytes
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog /var/log/httpd/access_log common
</IfModule>
<IfModule alias_module>
# Include some DirectAdmin alias
Include conf/extra/httpd-alias.conf
</IfModule>
DefaultType text/plain
<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-gzip .tgz
AddEncoding x-compress .Z
AddEncoding x-gzip .gz .tgz
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddHandler cgi-script .cgi
AddHandler type-map var
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
AddType video/x-ms-asf .avi
AddType video/mpeg .mpg
AddType video/mpeg .mpeg
AddType video/quicktime .mov
AddType video/x-ms-wmv .wmv
</IfModule>
#EnableMMAP off
#EnableSendfile off
我无法打开 nagios 监控,网址为:serverip/nagios 404 not found
更新:我创建了 crm 文件夹并且文档根目录错误已解决
但是当我浏览 ip/nagios 时显示:
未找到
答案1
你发布了 apache 的唯一主配置文件。但你显然包括了一堆额外的配置文件,这些文件来自(最有可能的)/etc/httpd/extra/* 或 /etc/httpd/conf.d/*
我找不到任何有关您要服务的 nagios 目录的配置的参考。此外,警告指出您正在尝试配置类似 vhost 的东西,其 documentroot 指向 /home/test/domains/suspended/crm。但我再次找不到显示您所做的操作的参考/配置。
因此请检查是否可以在任何目录中找到任何 *.conf 文件并查看这些配置。