Control Web Panel

WebPanel => CentOS 6 Problems => Topic started by: mouchoon on September 01, 2017, 01:44:30 PM

Title: server down after change server ip ? apache error
Post by: mouchoon on September 01, 2017, 01:44:30 PM
hello all!

after change server ip address and set this ip to centos ... apache error and server down and no access to cwp !

Stopping httpd:                                            [FAILED]
Starting httpd: AH00548: NameVirtualHost has no effect and will be removed in the next release /usr/local/apache/conf.d/ssl.conf:9
                                                           [FAILED]

pls help me!
Title: Re: server down after change server ip ? apache error
Post by: studio4host on September 04, 2017, 09:38:39 AM
you need to check apache error_log
/usr/local/apache/logs/error_log


Title: Re: server down after change server ip ? apache error
Post by: mouchoon on September 07, 2017, 12:55:28 AM
you need to check apache error_log ...

latest errors is this

AH02561: Failed to configure certificate host.***.net:443:0, check /etc/pki/tls/certs/host.***.net.cert
 [ssl:emerg] [pid 2490:tid 140349867616000] SSL Library Error: error:0906D06C:PEM routines:PEM_read_bio:no start line (Expecting: CERTIFICATE) -- Bad file contents or format - or even just a forgotten SSLCertificateKeyFile?
 [ssl:emerg] [pid 2490:tid 140349867616000] SSL Library Error: error:140AD009:SSL routines:SSL_CTX_use_certificate_file:PEM lib

any suggestion? pls
Title: Re: server down after change server ip ? apache error
Post by: mouchoon on September 07, 2017, 07:06:11 AM
when delet tow file -> /usr/local/apache/conf.d/ssl.conf
and -> /usr/local/apache/conf.d/hostname-ssl.conf

httpd restart ok  :)

But
service cwpsrv restart
Stopping cwpsrv:                                           [FAILED]
Starting cwpsrv: cwpsrv: [emerg] EM_read_bio_X509_AUX("/etc/pki/tls/certs/hostname.crt") failed (SSL: error:0906D06C:PEM routines:PEM_read_bio:no start line:Expecting: TRUSTED CERTIFICATE)
Title: Re: server down after change server ip ? apache error
Post by: mouchoon on September 07, 2017, 07:55:49 AM
fix this errors ....
 by generating a new hostname.key and hostname.crt

generate the new key by this :   sh /scripts/generate_hostname_ssl

 :D :D :D

thanks for all
Title: Re: server down after change server ip ? apache error
Post by: pinkukachari on October 15, 2017, 05:47:05 AM
My same Problem, help m

Starting httpd: AH00548: NameVirtualHost has no effect and will be removed in the next release /usr/local/apache/conf.d/ssl.conf:9
[  OK  ]
Title: Re: server down after change server ip ? apache error
Post by: darkness on October 15, 2017, 06:01:50 AM
Just open the file, remove the line and restart apache:
Code: [Select]
nano -w /usr/local/apache/conf.d/ssl.conf
Delete line 9 where "Name VirtualHost" is and:
Code: [Select]
service httpd restart
Then you will stop seeing this Warning.
Title: Re: server down after change server ip ? apache error
Post by: darkness on October 15, 2017, 06:11:37 AM
you need to check apache error_log ...

latest errors is this

AH02561: Failed to configure certificate host.***.net:443:0, check /etc/pki/tls/certs/host.***.net.cert
 [ssl:emerg] [pid 2490:tid 140349867616000] SSL Library Error: error:0906D06C:PEM routines:PEM_read_bio:no start line (Expecting: CERTIFICATE) -- Bad file contents or format - or even just a forgotten SSLCertificateKeyFile?
 [ssl:emerg] [pid 2490:tid 140349867616000] SSL Library Error: error:140AD009:SSL routines:SSL_CTX_use_certificate_file:PEM lib

any suggestion? pls
There`s an error in your "/etc/pki/tls/certs/host.***.net.cert". Create new certificate for "host.***.net.cert" using Apache Settings -> SSL Cert Manager or Certbot, replace with the new files in Apache Settings -> Apache Include Conf -> vhosts-ssl.conf and restart apache. If using Certbot, on the place for
Code: [Select]
SSLCertificateFile /etc/pki/tls/certs/host.***.net.cert
 SSLCertificateKeyFile /etc/pki/tls/private/host.***.net.key
 SSLCertificateChainFile /etc/pki/tls/certs/host.***.net.bundle
Use:
Code: [Select]
SSLCertificateFile /etc/letsencrypt/live/host.***.net/fullchain.pem
 SSLCertificateKeyFile /etc/letsencrypt/live/host.***.net/privkey.pem
 SSLCertificateChainFile /etc/letsencrypt/live/host.***.net/fullchain.pem
Else use standart files created by SSL Cert Manager.