Skip to content

Instantly share code, notes, and snippets.

@cygnetix
Last active August 29, 2015 14:12
Show Gist options
  • Save cygnetix/2fdd08a06e40c17f3024 to your computer and use it in GitHub Desktop.
Save cygnetix/2fdd08a06e40c17f3024 to your computer and use it in GitHub Desktop.
## /etc/httpd/conf.d/yubikey.conf
<VirtualHost *:80>
DocumentRoot /var/www/html/
ServerName yubikey.cygnetix.io
ErrorLog logs/yubikey.cygnetix.io-error_log
CustomLog logs/yubikey.cygnetix.io-access_log common
RewriteEngine on
RewriteRule ^(.*)$ $1.php [L]
## Only allow localhost here
<Location "/wsapi">
Order deny,allow
Deny from all
Allow from 127.0.0.1 ::1
</Location>
## Allow authorised clients and networks here
<Location "/wsapi/2.0">
Order deny,allow
Deny from all
Allow from 127.0.0.1 ::1
## Add networks that are allowed to authenticate here
# Allow from 10.0.0.0/24
</Location>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment