mirror of
https://github.com/oqyude/nixos.git
synced 2026-06-11 12:40:44 +03:00
123
This commit is contained in:
@@ -7,6 +7,9 @@ let
|
|||||||
server = "100.64.0.0";
|
server = "100.64.0.0";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
environment.etc."nginx/.htpasswd".text = ''
|
||||||
|
test:$apr1$3m7iYgVv$31i.S8LP3i8dKuOIBhoeE1
|
||||||
|
'';
|
||||||
users.users.nginx.extraGroups = [ "acme" ];
|
users.users.nginx.extraGroups = [ "acme" ];
|
||||||
services = {
|
services = {
|
||||||
nginx = {
|
nginx = {
|
||||||
@@ -22,6 +25,8 @@ in
|
|||||||
root = "/var/www/sub";
|
root = "/var/www/sub";
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
auth_basic "Restricted";
|
||||||
|
auth_basic_user_file /etc/nginx/.htpasswd;
|
||||||
autoindex off;
|
autoindex off;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user