Nginx

UserDir

Edit the site's configuration file, e.g., /etc/nginx/sites-available/site.conf, and add the following in the server section:

location ~ ^/~(.+?)(/.*)?$ {
    alias /home/$1/public_html$2;
    index index.html index.htm;
    autoindex on;
}

Ensure the user's home directory has the following permissions:

chmod 711 /home/user
chmod 755 /home/user/public_html

~~~

Last updated: 2021-11-19

Back to Techne index

Back to unixcat.coffee