server down after change server ip ? apache error

Started by mouchoon, September 01, 2017, 01:44:30 PM

Previous topic - Next topic

mouchoon

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!

studio4host

you need to check apache error_log
/usr/local/apache/logs/error_log


VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

mouchoon

Quote from: studio4host on September 04, 2017, 09:38:39 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

mouchoon

#3
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)

mouchoon

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

pinkukachari

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  ]

darkness

Just open the file, remove the line and restart apache:

nano -w /usr/local/apache/conf.d/ssl.conf

Delete line 9 where "Name VirtualHost" is and:

service httpd restart

Then you will stop seeing this Warning.
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...

darkness

Quote from: mouchoon on September 07, 2017, 12:55:28 AM
Quote from: studio4host on September 04, 2017, 09:38:39 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
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:

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.
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...