User authentication

Some pages in the menu are not meant for everyone in my network. So, I have restricted those with a username/password. Here’s how:
Browse to htaccesstools.com/htpasswd-generator/ and fill in the form, ie. username: music and password: player
Generate the .htpasswd and it will be something like: music:$apr1$uow7ESkz$3u7NgrmfJHwNFZtfNxBeT.
Copy this line into a file on Volumio, I did:

nano /home/pi/.htpasswd

Now change the config file for nginx to use this authentication method:

sudo vi /var/www/_OS_SETTINGS/etc/nginx/nginx.conf

find the following text in server1 area:

# php5-fpm location ~ \.php$ { root /var/www; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_read_timeout 3600; }
and change it to:

# php5-fpm location ~ \.php$ { root /var/www; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_read_timeout 3600; #} # php5-fpm restricted pages location ~ /(settings|net-config|mpd-config|dev)\.php$ { auth_basic "Resticted Pages!"; auth_basic_user_file /home/pi/.htpasswd; fastcgi_pass 127.0.0.1:9000; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $request_filename; } }
reboot the system

sudo reboot

The next time you go to one of the following pages:
settings.php
net-config.php
mpd-config.php
dev.php
it will ask you for a username and password.

Did you make any update with the current version, i.e. with NodeJS + ExpressJS version ?

PS: Oh wait, excuse me to get some help from this forum…

There is no point in resurrecting very old threads like this, especially since they refer to earlier (& very different) versions of Volumio.

(Asking the same question in multiple old threads is also rather antisocial.)

Cool, thanks for helping…