Skip to content

Instantly share code, notes, and snippets.

@gEndelf
Forked from bbrewer97202/heroku-htaccess.md
Created May 2, 2017 04:09
Show Gist options
  • Save gEndelf/457b96529f4b8cc523bd2d34ff12e60e to your computer and use it in GitHub Desktop.
Save gEndelf/457b96529f4b8cc523bd2d34ff12e60e to your computer and use it in GitHub Desktop.
Simple htaccess authentication on Heroku with cedar/php

Create an .htaccess file in the webroot:

AuthUserFile /app/www/.htpasswd
AuthType Basic
AuthName "Restricted Access"
Require valid-user

Create a .htpasswd file:

htpasswd -c /app/www/.htpasswd [username]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment