Skip to content

Instantly share code, notes, and snippets.

@yakatz
Created September 6, 2017 00:29
Show Gist options
  • Save yakatz/b406753f6bdc5e19ef5386361afa4b1c to your computer and use it in GitHub Desktop.
Save yakatz/b406753f6bdc5e19ef5386361afa4b1c to your computer and use it in GitHub Desktop.
httpd cluster config
Alias /custom-errors /etc/httpd/conf/errors
<Directory /etc/httpd/conf/errors>
Options +Includes
</Directory>
SetEnvIf User-Agent "KEMP 1.0" dontlogkemp dontlog
SetEnvIf User-Agent "gsa-crawler \(Enterprise; REMOVED1; admin@example.com\)" dontloggsa dontlog
SetEnvIf User-Agent "gsa-crawler \(Enterprise; REMOVED2; admin@example.com\)" dontloggsa dontlog
# HTTPD_CLUSTER_SERVER_ID is set by start-up script to be the last octet of the server's internal IP address.
PassEnv HTTPD_CLUSTER_SERVER_ID
<IfModule mod_headers.c>
Header append X-CSD-Backend "e" env=HTTPD_CLUSTER_SERVER_ID
Header append X-CSD-Backend "UNSET" env=!HTTPD_CLUSTER_SERVER_ID
</IfModule>
<IfModule mod_authnz_ldap.c>
LDAPTrustedGlobalCert CA_DER /etc/ipa/ca.crt
LDAPVerifyServerCert Off
LDAPTrustedMode TLS
</IfModule>
<VirtualHost *:443>
ServerName webapps.example.com
## Vhost docroot
DocumentRoot "/fs/webdev/html/"
<Directory "/fs/webdev/html/">
Options FollowSymLinks MultiViews
AllowOverride All
Require all granted
DirectoryIndex index.shtml index.php index.html index.htm index.html.var
</Directory>
ErrorLog "/var/log/httpd/webapps.example.com_ssl_error_ssl.log"
ServerSignature Off
CustomLog "/var/log/httpd/webapps.example.com_ssl_access_ssl.log" combined env=!dontlog
CustomLog "/var/log/httpd/kemp_access_log" "vhost_combined" env=dontlogkemp
CustomLog "/var/log/httpd/gsa_access_log" "vhost_combined" env=dontloggsa
SSLEngine on
SSLCertificateFile "/etc/pki/tls/certs/localhost.crt"
SSLCertificateKeyFile "/etc/pki/tls/private/localhost.key"
SSLCACertificatePath "/etc/pki/tls/certs"
ErrorDocument 500 /custom-errors/500.shtml
</VirtualHost>
AuthName "Example.com IPA Login"
AuthType Basic
AuthBasicProvider ldap
AuthLDAPBindAuthoritative on
AuthLDAPURL "ldap://ipa00.example.com ipa01.example.com ipa02.example.com/cn=users,cn=accounts,dc=example,dc=com?uid?sub?"
AuthLDAPBindDN "uid=webauth,cn=sysaccounts,cn=etc,dc=example,dc=com"
AuthLDAPBindPassword "PASSWORD"
AuthLDAPRemoteUserAttribute uid
Require valid-user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment