OPERATING SYSTEMSOS Linux

How to enable Apache2 userdir module on Ubuntu Server

How to enable userdir on Apache2 with Ubuntu Server

Hi everyone,

In this video I’ll show you how to enable userdir module on Apache2 Web server. With this module you can give your system users the ability to publish their own webpages. After that, I I’llshow you how protect a folder using the .htaccess and .htpasswd authentication method.

Check my video #5 to learn how to install apache2 at:

Here are the commands I’ve used:

a2enmod userdir
systemctl restart apache2
cd /home/rsmatias/
mkdir public_html/
chown rsmatias:rsmatias public_html/
chmod 755 public_html/
cd public_html/
nano index.html

mkdir private
chown rsmatias:rsmatias private/
chmod 755 private
nano /home/rsmatias/public_html/private/.htaccess

####Insert text configuration:####
AuthUserFile /home/rsmatias/public_html/private/.htpasswd
AuthName “Please Authenticate”
AuthType Basic
require valid-user

htpasswd -c /home/rsmatias/public_html/private/.htpasswd rsmatias

Please comment below for any questions of suggestions.

Thanks!!

Regards,
Rodrigo Matias

source

ubuntu

Leave a Reply

Your email address will not be published. Required fields are marked *