-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/nginx: create 127.0.0.1 alias for status page #349536
Conversation
@@ -1226,6 +1226,7 @@ in | |||
++ lib.optional cfg.recommendedZstdSettings pkgs.nginxModules.zstd; | |||
|
|||
services.nginx.virtualHosts.localhost = mkIf cfg.statusPage { | |||
serverAliases = [ "127.0.0.1" ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
serverAliases = [ "127.0.0.1" ]; | |
serverAliases = [ "127.0.0.1" "::1" ]; |
or is localhost resolving to that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have IPv6 enabled so not sure but I've added an alias for it as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have IPv6 enabled
That's still a thing?
a13cd06
to
d916854
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
d916854
to
449a963
Compare
Will wait for ofborg and merge after that. |
Things done
Makes the status page more intuitive, since you expect
127.0.0.1
to work. Currentlycurl http://127.0.0.1/nginx_status
will return a301
.Also current description:
nixpkgs/nixos/modules/services/web-servers/nginx/default.nix
Lines 484 to 490 in a13cd06
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.