Password-protect Parts of Your Website

Prerequisites You will need a running ubuntu server to follow the steps in this article. Setup Enter in terminal: sudo apt-get update sudo apt-get install apache2 apache2-utils sudo htpasswd -c /etc/apache2/.htpasswd some-username sudo nano /etc/apache2/sites-enabled/000-default.conf Add: <Directory “/var/www/html”> AuthType Basic AuthName “Restricted Content” AuthUserFile /etc/apache2/.htpasswd Require valid-user </Directory> Replace /var/www/html with the path to the directory you want to […]

Host Static Files with Apache on Digitalocean

1. Setup Digital Ocean Server Login or create an account and spin up a new ubuntu 14.04 droplet at www.digitalocean.com, it is pretty self explanatory. In the options, you should choose login through SSH if you want to follow this article step by step. Then login to your Server: ssh root@<yourIp> (e.g. ssh root@46.101.131.21). 2. Install Apache […]