Skip to content

Instantly share code, notes, and snippets.

@lelledaniele
Last active May 19, 2017 22:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lelledaniele/2b88a353312068d54c106a3a66f11a2f to your computer and use it in GitHub Desktop.
Save lelledaniele/2b88a353312068d54c106a3a66f11a2f to your computer and use it in GitHub Desktop.
cloud9 apache htpasswd basic auth

Basic Auth on Cloud9

Change Apache coniguration

Edit the Apache Cloud9 configuration file

sudo vi /etc/apache2/sites-enabled/001-cloud9.conf

Add these lines

<Directory /home/ubuntu/workspace>
  Options Indexes FollowSymLinks
  AllowOverride All
  AuthType Basic
  AuthName "Restricted Content"
  AuthUserFile /home/ubuntu/workspace/.htpasswd
  Require valid-user
</Directory>

Create .htpasswd file

  • Create the .htpasswd file in your root project.
  • Added your username and password.
  • Use this website to generate login details

Restart Apache

sudo service apache2 restart

Lelle - License

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment