apache error
-
- Posts: 2019
- Joined: 2015/02/17 15:14:33
- Location: Bulgaria
- Contact:
Re: apache error
Could you post your nss.conf (remove sensitive information if any)?
-
- Posts: 45
- Joined: 2014/10/24 16:20:13
Re: apache error
Code: Select all
sudo cat /etc/httpd/conf.d/nss.conf
#
# This is the Apache server configuration file providing SSL support using.
# the mod_nss plugin. It contains the configuration directives to instruct
# the server how to serve pages over an https connection.
#
# 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.
#
#
# When we also provide SSL we have to listen to the
# standard HTTP port (see above) and to the HTTPS port
#
# Note: Configurations that use IPv6 but not IPv4-mapped addresses need two
# Listen directives: "Listen [::]:8443" and "Listen 0.0.0.0:443"
#
Listen 8443
##
## SSL Global Context
##
## All SSL configuration in this context applies both to
## the main server and all SSL-enabled virtual hosts.
##
#
# Some MIME-types for downloading Certificates and CRLs
#
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
# Pass Phrase Dialog:
# Configure the pass phrase gathering process.
# The filtering dialog program (`builtin' is a internal
# terminal dialog) has to provide the pass phrase on stdout.
NSSPassPhraseDialog builtin
# Pass Phrase Helper:
# This helper program stores the token password pins between
# restarts of Apache.
NSSPassPhraseHelper /usr/libexec/nss_pcache
# Configure the SSL Session Cache.
# NSSSessionCacheSize is the number of entries in the cache.
# NSSSessionCacheTimeout is the SSL2 session timeout (in seconds).
# NSSSession3CacheTimeout is the SSL3/TLS session timeout (in seconds).
NSSSessionCacheSize 10000
NSSSessionCacheTimeout 100
NSSSession3CacheTimeout 86400
#
# Pseudo Random Number Generator (PRNG):
# Configure one or more sources to seed the PRNG of the SSL library.
# The seed data should be of good random quality.
# WARNING! On some platforms /dev/random blocks if not enough entropy
# is available. Those platforms usually also provide a non-blocking
# device, /dev/urandom, which may be used instead.
#
# This does not support seeding the RNG with each connection.
NSSRandomSeed startup builtin
#NSSRandomSeed startup file:/dev/random 512
#NSSRandomSeed startup file:/dev/urandom 512
#
# TLS Negotiation configuration under RFC 5746
#
# Only renegotiate if the peer's hello bears the TLS renegotiation_info
# extension. Default off.
NSSRenegotiation off
# Peer must send Signaling Cipher Suite Value (SCSV) or
# Renegotiation Info (RI) extension in ALL handshakes. Default: off
NSSRequireSafeNegotiation off
##
## SSL Virtual Host Context
##
<VirtualHost _default_:8443>
# General setup for the virtual host
#DocumentRoot "/etc/httpd/htdocs"
#ServerName www.example.com:8443
#ServerAdmin you@example.com
# mod_nss can log to separate log files, you can choose to do that if you'd like
# LogLevel is not inherited from httpd.conf.
ErrorLog /etc/httpd/logs/error_log
TransferLog /etc/httpd/logs/access_log
LogLevel warn
# SSL Engine Switch:
# Enable/Disable SSL for this virtual host.
NSSEngine on
# SSL Cipher Suite:
# List the ciphers that the client is permitted to negotiate.
# See the mod_nss documentation for a complete list.
NSSCipherSuite +aes_128_sha_256,+aes_256_sha_256,+ecdhe_ecdsa_aes_128_gcm_sha_256,+ecdhe_ecdsa_aes_128_sha,+ecdhe_ecdsa_aes_256_sha,+ecdhe_rsa_aes_128_gcm_sha_256,+ecdhe_rsa_aes_128_sha,+ecdhe_rsa_aes_256_sha,+rsa_aes_128_gcm_sha_256,+rsa_aes_128_sha,+rsa_aes_256_sha
# SSL Protocol:
# Cryptographic protocols that provide communication security.
# NSS handles the specified protocols as "ranges", and automatically
# negotiates the use of the strongest protocol for a connection starting
# with the maximum specified protocol and downgrading as necessary to the
# minimum specified protocol that can be used between two processes.
# Since all protocol ranges are completely inclusive, and no protocol in the
# middle of a range may be excluded, the entry "NSSProtocol SSLv3,TLSv1.1"
# is identical to the entry "NSSProtocol SSLv3,TLSv1.0,TLSv1.1".
NSSProtocol TLSv1.0,TLSv1.1,TLSv1.2
# SSL Certificate Nickname:
# The nickname of the RSA server certificate you are going to use.
NSSNickname Server-Cert
# SSL Certificate Nickname:
# The nickname of the ECC server certificate you are going to use, if you
# have an ECC-enabled version of NSS and mod_nss
#NSSECCNickname Server-Cert-ecc
# Server Certificate Database:
# The NSS security database directory that holds the certificates and
# keys. The database consists of 3 files: cert8.db, key3.db and secmod.db.
# Provide the directory that these files exist.
NSSCertificateDatabase /etc/httpd/alias
# Database Prefix:
# In order to be able to store multiple NSS databases in one directory
# they need unique names. This option sets the database prefix used for
# cert8.db and key3.db.
#NSSDBPrefix my-prefix-
# Client Authentication (Type):
# Client certificate verification type. Types are none, optional and
# require.
#NSSVerifyClient none
#
# Online Certificate Status Protocol (OCSP).
# Verify that certificates have not been revoked before accepting them.
#NSSOCSP off
#
# Use a default OCSP responder. If enabled this will be used regardless
# of whether one is included in a client certificate. Note that the
# server certificate is verified during startup.
#
# NSSOCSPDefaultURL defines the service URL of the OCSP responder
# NSSOCSPDefaultName is the nickname of the certificate to trust to
# sign the OCSP responses.
#NSSOCSPDefaultResponder on
#NSSOCSPDefaultURL http://example.com/ocsp/status
#NSSOCSPDefaultName ocsp-nickname
# Access Control:
# With SSLRequire you can do per-directory access control based
# on arbitrary complex boolean expressions containing server
# variable checks and other lookup directives. The syntax is a
# mixture between C and Perl. See the mod_nss documentation
# for more details.
#<Location />
#NSSRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
# and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
# and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
# and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
# and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \
# or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
#</Location>
# SSL Engine Options:
# Set various options for the SSL engine.
# o FakeBasicAuth:
# Translate the client X.509 into a Basic Authorisation. This means that
# the standard Auth/DBMAuth methods can be used for access control. The
# user name is the `one line' version of the client's X.509 certificate.
# Note that no password is obtained from the user. Every entry in the user
# file needs this password: `xxj31ZMTZzkVA'.
# o ExportCertData:
# This exports two additional environment variables: SSL_CLIENT_CERT and
# SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
# server (always existing) and the client (only existing when client
# authentication is used). This can be used to import the certificates
# into CGI scripts.
# o StdEnvVars:
# This exports the standard SSL/TLS related `SSL_*' environment variables.
# Per default this exportation is switched off for performance reasons,
# because the extraction step is an expensive operation and is usually
# useless for serving static content. So one usually enables the
# exportation for CGI and SSI requests only.
# o StrictRequire:
# This denies access when "NSSRequireSSL" or "NSSRequire" applied even
# under a "Satisfy any" situation, i.e. when it applies access is denied
# and no other module can change it.
# o OptRenegotiate:
# This enables optimized SSL connection renegotiation handling when SSL
# directives are used in per-directory context.
#NSSOptions +FakeBasicAuth +ExportCertData +CompatEnvVars +StrictRequire
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
NSSOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
NSSOptions +StdEnvVars
</Directory>
# Per-Server Logging:
# The home of a custom SSL log file. Use this when you want a
# compact non-error SSL logfile on a virtual host basis.
#CustomLog /home/rcrit/redhat/apache/logs/ssl_request_log \
# "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
Re: apache error
What do you get from rpm -V mod_nss ? What about locate libmodnss.so ?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
-
- Posts: 45
- Joined: 2014/10/24 16:20:13
Re: apache error
Code: Select all
[@asm-automation01 ~]$ rpm -V mod_nss
.......T. c /etc/httpd/conf.d/nss.conf
[r@asm-automation01 ~]$ locate libmodnss.so
/usr/lib64/httpd/modules/libmodnss.so
[@asm-automation01 ~]$
-
- Posts: 2019
- Joined: 2015/02/17 15:14:33
- Location: Bulgaria
- Contact:
-
- Posts: 45
- Joined: 2014/10/24 16:20:13
Re: apache error
Code: Select all
@asm-automation01 ~]$ sudo cp -pv /etc/httpd/conf.d/nss.conf /root/nss.conf.`date +%F`
‘/etc/httpd/conf.d/nss.conf’ -> ‘/root/nss.conf.2017-07-25’
[@asm-automation01 ~]$ sudo cp -afv /etc/httpd/conf.modules.d/10-nss.conf /etc/httpd/conf.d/nss.load
‘/etc/httpd/conf.modules.d/10-nss.conf’ -> ‘/etc/httpd/conf.d/nss.load’
[@asm-automation01 ~]$ httpd -t -D MODULES
AH00526: Syntax error on line 30 of /etc/httpd/conf.d/05-foreman-ssl.conf:
SSLCertificateFile: file '/var/lib/puppet/ssl/certs/asm-automation01.borg.local.pem' does not exist or is empty
[@asm-automation01 ~]$ sudo vim /etc/httpd/conf.d/05-foreman-ssl.conf
[@asm-automation01 ~]$ sudo systemctl restart httpd
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
[@asm-automation01 ~]$
sudo systemctl restart httpd
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
[@asm-automation01 ~]$ sudo systemctl status httpd -l
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2017-07-25 14:39:08 CDT; 1min 52s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 17769 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 17768 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 17768 (code=exited, status=1/FAILURE)
Jul 25 14:39:08 asm-automation01.borg.local httpd[17768]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:8443
Jul 25 14:39:08 asm-automation01.borg.local httpd[17768]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:8443
Jul 25 14:39:08 asm-automation01.borg.local httpd[17768]: no listening sockets available, shutting down
Jul 25 14:39:08 asm-automation01.borg.local httpd[17768]: AH00015: Unable to open logs
Jul 25 14:39:08 asm-automation01.borg.local systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jul 25 14:39:08 asm-automation01.borg.local kill[17769]: kill: cannot find process ""
Jul 25 14:39:08 asm-automation01.borg.local systemd[1]: httpd.service: control process exited, code=exited status=1
Jul 25 14:39:08 asm-automation01.borg.local systemd[1]: Failed to start The Apache HTTP Server.
Jul 25 14:39:08 asm-automation01.borg.local systemd[1]: Unit httpd.service entered failed state.
Jul 25 14:39:08 asm-automation01.borg.local systemd[1]: httpd.service failed.
-
- Posts: 45
- Joined: 2014/10/24 16:20:13
Re: apache error
Code: Select all
sudo netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/systemd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1119/sshd
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 1941/postgres
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2281/master
tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN 2339/ruby
tcp6 0 0 :::111 :::* LISTEN 1/systemd
tcp6 0 0 :::22 :::* LISTEN 1119/sshd
tcp6 0 0 ::1:5432 :::* LISTEN 1941/postgres
tcp6 0 0 ::1:25 :::* LISTEN 2281/master
udp 0 0 0.0.0.0:69 0.0.0.0:* 1123/xinetd
udp 0 0 10.150.10.103:123 0.0.0.0:* 771/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 771/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 771/ntpd
udp6 0 0 fe80::20c:29ff:fedb:123 :::* 771/ntpd
udp6 0 0 ::1:123 :::* 771/ntpd
udp6 0 0 :::123 :::* 771/ntpd
-
- Posts: 2019
- Joined: 2015/02/17 15:14:33
- Location: Bulgaria
- Contact:
Re: apache error
Is this certificate really missing ?[@asm-automation01 ~]$ httpd -t -D MODULES
AH00526: Syntax error on line 30 of /etc/httpd/conf.d/05-foreman-ssl.conf:
SSLCertificateFile: file '/var/lib/puppet/ssl/certs/asm-automation01.borg.local.pem' does not exist or is empty
...
Jul 25 14:39:08 asm-automation01.borg.local httpd[17768]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:8443
Jul 25 14:39:08 asm-automation01.borg.local httpd[17768]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:8443
Jul 25 14:39:08 asm-automation01.borg.local httpd[17768]: no listening sockets available, shutting down
Are you using SELinux ? This port (8443) is not a default one ,and you will need to use
Code: Select all
semanage port
Re: apache error
What's in /etc/httpd/conf.modules.d/10-nss.conf
Skip that, it verified ok so it must be the default.
Skip that, it verified ok so it must be the default.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
-
- Posts: 45
- Joined: 2014/10/24 16:20:13
Re: apache error
Code: Select all
sudo semanage port -a -t http_port_t -p tcp 8443
ValueError: Port tcp/8443 already defined
sudo getenforce
Permissive