Skip to content

Instantly share code, notes, and snippets.

@nepda
Created March 25, 2018 19:07
Show Gist options
  • Save nepda/7540baba65f423aa791499d8f6d3bf91 to your computer and use it in GitHub Desktop.
Save nepda/7540baba65f423aa791499d8f6d3bf91 to your computer and use it in GitHub Desktop.
apache mod_auth_openidc
<VirtualHost *:80>
ServerName example.com
Redirect permanent / https://example.com/
</VirtualHost>
<VirtualHost *:443>
ServerName example.com
DocumentRoot /var/www/html/
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
OIDCProviderMetadataURL https://login.example.com/auth/realms/my-company/.well-known/openid-configuration
OIDCClientID apache
OIDCClientSecret 6ae568df-3309-4346-a64f-29df5157c470
OIDCRedirectURI https://example.com/redirected
OIDCCryptoPassphrase cae4Aan3ohwahJeij8bahquah7doh9
OIDCProviderTokenEndpointAuth client_secret_basic
OIDCRemoteUserClaim email
OIDCScope "openid email"
<Location "/">
AuthType openid-connect
Require valid-user
</Location>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment