2017-09-20 3 views
1

전용 루트 서버에서 데비안을 실행하고 관리 패널에서 directadmin을 사용합니다. 오늘 오후부터 다음과 같은 문제가 있습니다. 서비스 httpd가 중지되어 실행할 수 없어 내 웹 사이트에 더 이상 액세스 할 수 없습니다. 서비스를 시작하려고하면 항상 오류 메시지가 표시됩니다. httpd (no pid file) not running.AH00016 : 구성 실패

이전에 여러 도메인에 대해 SSL 인증서를 설치 한 것과 관련이 있음을 발견했습니다.

나는 이미 문제를 일으키는 SSL 인증서 (도메인)를 확인하기 위해 tool strace를 설치하려고 시도했습니다. strace -f apache2ctl start

오류 메시지가 항상 : /etc/init.d/httpd start>/dev/null 2> & 1

: command not found

내가 DirectAdmin에 걸쳐 서비스 아파치를 시작하려고하면 다음과 같은 오류 메시지가 오는 불행하게도, strace를 도구는 다음과 같은 명령을 시작할 수 없습니다

나는 또한 서비스 아파치의 errorlogs의의 error_log로 보면서 발견 한 다음과 같은 오류 코드 : 이것은 내 아파치 HTTP 서버 공동

[Wed Sep 20 17:44:07.757294 2017] [core:notice] [pid 14483] AH00094: Command 
line: '/usr/sbin/httpd -D SSL' 
[Wed Sep 20 17:45:01.465358 2017] [core:error] [pid 14483] (2)No such file 
or directory: AH00095: failed to remove PID file /var/run/httpd.pid 
[Wed Sep 20 17:45:01.465471 2017] [mpm_prefork:notice] [pid 14483] AH00169: 
caught SIGTERM, shutting down 
[Wed Sep 20 17:45:05.763192 2017] [ssl:warn] [pid 16564] AH01909: 
localhost:443:0 server certificate does NOT include an ID which matches the 
server name 
[Wed Sep 20 17:45:05.764719 2017] [ssl:warn] [pid 16564] AH01909: 
www.example.com:443:0 server certificate does NOT include an ID which matches 
the server name 
[Wed Sep 20 17:45:05.765357 2017] [suexec:notice] [pid 16564] AH: suEXEC 
mechanism enabled (wrapper: /usr/sbin/suexec) 
[Wed Sep 20 17:45:06.609175 2017] [auth_digest:notice] [pid 16679] AH01757: 
generating secret for digest authentication ... 
[Wed Sep 20 17:45:07.723436 2017] [ssl:warn] [pid 16679] AH01909: 
localhost:443:0 server certificate does NOT include an ID which matches the 
server name 
[Wed Sep 20 17:45:07.724945 2017] [ssl:warn] [pid 16679] AH01909: 
www.example.com:443:0 server certificate does NOT include an ID which matches 
the server name 
[Wed Sep 20 17:45:07.725568 2017] [lbmethod_heartbeat:notice] [pid 16679] 
AH02282: No slotmem from mod_heartmonitor 
[Wed Sep 20 17:45:07.726220 2017] [:notice] [pid 16679] mod_ruid2/0.9.8 
enabled 
[Wed Sep 20 17:45:07.756478 2017] [mpm_prefork:notice] [pid 16679] AH00163: 
Apache/2.4.18 (Unix) OpenSSL/1.0.1t PHP/5.5.31 configured -- resuming normal 
operations 
[Wed Sep 20 17:45:07.756599 2017] [core:notice] [pid 16679] AH00094: Command 
line: '/usr/sbin/httpd -D SSL' 
[Wed Sep 20 17:46:01.520770 2017] [core:error] [pid 16679] (2)No such file or 
directory: AH00095: failed to remove PID file /var/run/httpd.pid 
[Wed Sep 20 17:46:01.521067 2017] [mpm_prefork:notice] [pid 16679] AH00169: 
caught SIGTERM, shutting down 
AH00016: Configuration Failed 
AH00016: Configuration Failed 
AH00016: Configuration Failed 

입니다 nfiguration 파일.

# 
# This is the main Apache HTTP server configuration file. It contains the 
# configuration directives that give the server its instructions. 
# See <URL:http://httpd.apache.org/docs/2.4> for detailed information. 
# In particular, see 
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html> 
# for a discussion of each configuration directive. 
# 
# Do NOT simply read the instructions in here without understanding 
# what they do. They're here only as hints or reminders. If you are unsure 
# consult the online docs. You have been warned. 

# 
# ServerRoot: The top of the directory tree under which the server's 
# configuration, error, and log files are kept. 
# 
# Do not add a slash at the end of the directory path. If you point 
# ServerRoot at a non-local disk, be sure to specify a local disk on the 
# Mutex directive, if file-based mutexes are used. If you wish to share the 
# same ServerRoot for multiple httpd daemons, you will need to change at 
# least PidFile. 
# 
ServerRoot "/etc/httpd" 

# 
# Listen: Allows you to bind Apache to specific IP addresses and/or 
# ports, instead of the default. See also the <VirtualHost> 
# directive. 
# 
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses. 
# 
#Listen 12.34.56.78:80 
Listen 80 

<IfModule unixd_module> 
# 
# If you wish httpd to run as a different user or group, you must run 
# httpd as root initially and it will switch. 
# 
# User/Group: The name (or #number) of the user/group to run httpd as. 
# It is usually good practice to create a dedicated user and group for 
# running httpd, as with most system services. 
# 
User apache 
Group apache 
</IfModule> 

#LoadModule dummy_module /usr/lib/apache/mod_dummy.so 
Include /etc/httpd/conf/extra/httpd-phpmodules.conf 

# 
# ServerAdmin: Your address, where problems with the server should be 
# e-mailed. This address appears on some server-generated pages, such 
# as error documents. e.g. [email protected] 
# 
ServerAdmin [email protected] 
DocumentRoot "/var/www/html" 

<IfModule dir_module> 
    DirectoryIndex index.html index.htm index.shtml index.php index.php5 index.php4 index.php3 index.phtml index.cgi index.pl 
</IfModule> 

# 
# The following lines prevent .htaccess and .htpasswd files from being 
# viewed by Web clients. 
# 
<Files ".ht*"> 
    Require all denied 
</Files> 

# 
# The following lines prevent .user.ini files from being viewed by Web clients. 
# 
<Files ".user.ini"> 
    Require all denied 
</Files> 

# 
# ErrorLog: The location of the error log file. 
# If you do not specify an ErrorLog directive within a <VirtualHost> 
# container, error messages relating to that virtual host will be 
# logged here. If you *do* define an error logfile for a <VirtualHost> 
# container, that host's errors will be logged there and not here. 
# 
ErrorLog /var/log/httpd/error_log 

# 
# LogLevel: Control the number of messages logged to the error_log. 
# Possible values include: debug, info, notice, warn, error, crit, 
# alert, emerg. 
# 
LogLevel warn 

<IfModule log_config_module> 
    #replace %b with %O for more accurate logging 
    <IfModule mod_logio.c> 
     LogFormat "%a %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 
     LogFormat "%a %l %u %t \"%r\" %>s %O" common 
     LogFormat "%O %I" bytes 

     LogFormat "%a %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> 

# 
# MaxRanges: Maximum number of Ranges in a request before 
# returning the entire resource, or one of the special 
# values 'default', 'none' or 'unlimited'. 
# Default setting is to accept 200 Ranges. 
#MaxRanges unlimited 

# 
# EnableMMAP and EnableSendfile: On systems that support it, 
# memory-mapping or the sendfile syscall may be used to deliver 
# files. This usually improves server performance, but must 
# be turned off when serving from networked-mounted 
# filesystems or if support for these functions is otherwise 
# broken on your system. 
# Defaults: EnableMMAP On, EnableSendfile Off 
# 
#EnableMMAP off 
#EnableSendfile off 

####################################################################################### 
# For user configurations not maintained by DirectAdmin. Empty by default. 
####################################################################################### 

Include conf/extra/httpd-includes.conf 

####################################################################################### 
# Supplemental configuration 
####################################################################################### 

# Options and AllowOverrides 
Include conf/extra/httpd-directories.conf 

# Nginx reverse proxy configuration 
Include conf/extra/httpd-nginx.conf 

# Server-pool management (MPM specific) 
Include conf/extra/httpd-mpm.conf 

# Multi-language error messages 
Include conf/extra/httpd-multilang-errordoc.conf 

# Fancy directory listings 
Include conf/extra/httpd-autoindex.conf 

# Language settings 
Include conf/extra/httpd-languages.conf 

# User home directories 
#Include conf/extra/httpd-userdir.conf 

# Real-time info on requests and configuration 
Include conf/extra/httpd-info.conf 

# Suphp 
Include conf/extra/httpd-suphp.conf 

# Local access to the Apache HTTP Server Manual 
#Include conf/extra/httpd-manual.conf 

# Distributed authoring and versioning (WebDAV) 
Include conf/extra/httpd-dav.conf 

# Various default settings 
Include conf/extra/httpd-default.conf 

# Secure (SSL/TLS) connections 
Include conf/extra/httpd-ssl.conf 

# Deflate module settings 
Include conf/extra/httpd-deflate.conf 

####################################################################################### 
# Do not change anything in files below, because they are rewritten by DirectAdmin # 
####################################################################################### 

# This is needed for PHP 
Include conf/extra/httpd-php-handlers.conf 

# Virtual hosts 
Include conf/extra/httpd-vhosts.conf 

# All the DirectAdmin vhosts 
Include conf/extra/directadmin-vhosts.conf 

####################################################################################### 
# End of included files that are rewritten by DirectAdmin        # 
####################################################################################### 

<IfModule ssl_module> 
SSLRandomSeed startup builtin 
SSLRandomSeed connect builtin 
</IfModule> 

누군가가이 이상한 문제를 도울 수 있기를 바랍니다. 나는 기쁠 것이야.

+0

내 웹 사이트는 일주일 동안 오프라인 상태입니다. 나는 더 이상 모른다는 이유로 누군가가 나를 도울 수 있기를 바랍니다. 제발 도와주세요! 고맙습니다! – agxl

답변

0

로그에 메시지가 :

server certificate does NOT include an ID which matches the server name

는 문제가 있음을 나타냅니다. 함께 인증서를 확인합니다

openssl x509 -in certificate.crt -text -noout 

그런 다음 아파치 설정 파일에 ServerName 지시어와 같은 서버 이름을 정의합니다.

+0

답변 해 주셔서 감사합니다. 나는 그것을 시도하고 다음과 같은 오류 메시지가 나타납니다 : 인증서 certificate.crt 139906369205928 오류 : 02001002 : 시스템 라이브러리 : fopen : 해당 파일 또는 디렉토리를 여는 중 오류가 발생했습니다. bss_file.c : 398 : fopen ('certificate. CRT ','R ') 139906369205928 : 오류 : 20074002 : BIO 루틴 : FILE_CTRL : 시스템 LIB : bss_file.c : 400 : 인증서 난 당신이 좀 도와 수 있기를 바랍니다 를로드 할 수 없습니다. – agxl

+0

질문을 편집하고 아파치 설정을 추가 할 수 있습니까? –

+0

귀하의 답변에 많은 감사드립니다. 내 서버에서 5 개의 httpd.conf 파일을 찾았습니다. '/usr/local/directadmin/data/users/admin/httpd.conf /usr/local/directadmin/data/templates/httpd.conf /usr/local/directadmin/custombuild/configure/ap2/conf/httpd.conf /etc/httpd/conf/original/httpd.conf /etc/httpd/conf/httpd.conf' 어느 것이 옳은가요? – agxl

관련 문제