From 3121216d1cd21ea989ef92d30c5e9214f7262e71 Mon Sep 17 00:00:00 2001 From: Jack D Date: Mon, 8 May 2023 22:16:13 +0100 Subject: [PATCH 1/7] added pterodactyl config --- pterodactylnode.subdomain.conf.sample | 60 ++++++++++++++++++++++++++ pterodactylpanel.subdomain.conf.sample | 48 +++++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 pterodactylnode.subdomain.conf.sample create mode 100644 pterodactylpanel.subdomain.conf.sample diff --git a/pterodactylnode.subdomain.conf.sample b/pterodactylnode.subdomain.conf.sample new file mode 100644 index 0000000..a0f047b --- /dev/null +++ b/pterodactylnode.subdomain.conf.sample @@ -0,0 +1,60 @@ +## Version 2023/05/08 +# this is for nodes, not your actual panel +# make sure you set your node to use 443 as its API port +# make sure that your pterodactylnode container is named pterodactylnode +# make sure that your dns has a cname set for pterodactylnode + +server { + listen 443 ssl; + listen [::]:443 ssl; + + server_name pterodactylnode.*; + + include /config/nginx/ssl.conf; + + client_max_body_size 0; + + # enable for ldap auth (requires ldap-location.conf in the location block) + #include /config/nginx/ldap-server.conf; + + # enable for Authelia (requires authelia-location.conf in the location block) + #include /config/nginx/authelia-server.conf; + + # enable for Authentik (requires authentik-location.conf in the location block) + #include /config/nginx/authentik-server.conf; + + location ~ ^\/api\/servers\/(?.*)?\/ws$ { + + include /config/nginx/proxy.conf; + include /config/nginx/resolver.conf; + set $upstream_app pterodactylnode; + set $upstream_port 443; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port/api/servers/$serverid/ws; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } + + location / { + # enable the next two lines for http auth + #auth_basic "Restricted"; + #auth_basic_user_file /config/nginx/.htpasswd; + + # enable for ldap auth (requires ldap-server.conf in the server block) + #include /config/nginx/ldap-location.conf; + + # enable for Authelia (requires authelia-server.conf in the server block) + #include /config/nginx/authelia-location.conf; + + # enable for Authentik (requires authentik-server.conf in the server block) + #include /config/nginx/authentik-location.conf; + + include /config/nginx/proxy.conf; + include /config/nginx/resolver.conf; + set $upstream_app pterodactylnode; + set $upstream_port 443; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + + } +} \ No newline at end of file diff --git a/pterodactylpanel.subdomain.conf.sample b/pterodactylpanel.subdomain.conf.sample new file mode 100644 index 0000000..767301c --- /dev/null +++ b/pterodactylpanel.subdomain.conf.sample @@ -0,0 +1,48 @@ +## Version 2023/05/08 +# this is for your actual panel, not nodes +# make sure you set your pterodactyl servers "remote" and "api" addresses to the domains you specify here +# ensure you have enabled "ssl encryption" and (if necessary) "behind proxy" in your pterodactyl server +# make sure that your pterodactyl container is named pterodactyl +# make sure that your dns has a cname set for pterodactyl + +server { + listen 443 ssl; + listen [::]:443 ssl; + + server_name pterodactyl.*; + + include /config/nginx/ssl.conf; + + client_max_body_size 0; + + # enable for ldap auth (requires ldap-location.conf in the location block) + #include /config/nginx/ldap-server.conf; + + # enable for Authelia (requires authelia-location.conf in the location block) + #include /config/nginx/authelia-server.conf; + + # enable for Authentik (requires authentik-location.conf in the location block) + #include /config/nginx/authentik-server.conf; + + location / { + # enable the next two lines for http auth + #auth_basic "Restricted"; + #auth_basic_user_file /config/nginx/.htpasswd; + + # enable for ldap auth (requires ldap-server.conf in the server block) + #include /config/nginx/ldap-location.conf; + + # enable for Authelia (requires authelia-server.conf in the server block) + #include /config/nginx/authelia-location.conf; + + # enable for Authentik (requires authentik-server.conf in the server block) + #include /config/nginx/authentik-location.conf; + include /config/nginx/proxy.conf; + include /config/nginx/resolver.conf; + set $upstream_app pterodactyl; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + + } +} \ No newline at end of file From 187ba0c93177b67b650becdbe369287d9c3acc54 Mon Sep 17 00:00:00 2001 From: Jack D <77021733+GetLifty@users.noreply.github.com> Date: Sat, 20 May 2023 00:50:04 +0100 Subject: [PATCH 2/7] Rename pterodactylpanel.subdomain.conf.sample to pterodactyl.subdomain.conf.sample --- ...l.subdomain.conf.sample => pterodactyl.subdomain.conf.sample | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename pterodactylpanel.subdomain.conf.sample => pterodactyl.subdomain.conf.sample (99%) diff --git a/pterodactylpanel.subdomain.conf.sample b/pterodactyl.subdomain.conf.sample similarity index 99% rename from pterodactylpanel.subdomain.conf.sample rename to pterodactyl.subdomain.conf.sample index 767301c..2d2b80a 100644 --- a/pterodactylpanel.subdomain.conf.sample +++ b/pterodactyl.subdomain.conf.sample @@ -45,4 +45,4 @@ server { proxy_pass $upstream_proto://$upstream_app:$upstream_port; } -} \ No newline at end of file +} From 6098392eb97736c132631ff7b326fa62811e4c15 Mon Sep 17 00:00:00 2001 From: Jack D <77021733+GetLifty@users.noreply.github.com> Date: Sat, 20 May 2023 00:52:10 +0100 Subject: [PATCH 3/7] Update pterodactylnode.subdomain.conf.sample Co-authored-by: Eric Nemchik --- pterodactylnode.subdomain.conf.sample | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pterodactylnode.subdomain.conf.sample b/pterodactylnode.subdomain.conf.sample index a0f047b..c73a9a7 100644 --- a/pterodactylnode.subdomain.conf.sample +++ b/pterodactylnode.subdomain.conf.sample @@ -23,17 +23,6 @@ server { # enable for Authentik (requires authentik-location.conf in the location block) #include /config/nginx/authentik-server.conf; - location ~ ^\/api\/servers\/(?.*)?\/ws$ { - - include /config/nginx/proxy.conf; - include /config/nginx/resolver.conf; - set $upstream_app pterodactylnode; - set $upstream_port 443; - set $upstream_proto http; - proxy_pass $upstream_proto://$upstream_app:$upstream_port/api/servers/$serverid/ws; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - } location / { # enable the next two lines for http auth From b3b500a8eb702d9a84da463b4a46eaf16b74a19b Mon Sep 17 00:00:00 2001 From: Jack D <77021733+GetLifty@users.noreply.github.com> Date: Sat, 20 May 2023 00:52:15 +0100 Subject: [PATCH 4/7] Update pterodactylnode.subdomain.conf.sample Co-authored-by: Eric Nemchik --- pterodactylnode.subdomain.conf.sample | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pterodactylnode.subdomain.conf.sample b/pterodactylnode.subdomain.conf.sample index c73a9a7..02803f2 100644 --- a/pterodactylnode.subdomain.conf.sample +++ b/pterodactylnode.subdomain.conf.sample @@ -46,4 +46,14 @@ server { proxy_pass $upstream_proto://$upstream_app:$upstream_port; } + + location ~ (/pterodactylnode)?/api { + include /config/nginx/proxy.conf; + include /config/nginx/resolver.conf; + set $upstream_app pterodactylnode; + set $upstream_port 443; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port/api/servers/$serverid/ws; + + } } \ No newline at end of file From 8355cdc795ef6cf74b9ba5f7d67e65928e001a47 Mon Sep 17 00:00:00 2001 From: Jack D <77021733+GetLifty@users.noreply.github.com> Date: Sat, 20 May 2023 01:02:00 +0100 Subject: [PATCH 5/7] Update pterodactyl.subdomain.conf.sample - attempt to fix whitespace --- pterodactyl.subdomain.conf.sample | 56 +++++++++++++++---------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/pterodactyl.subdomain.conf.sample b/pterodactyl.subdomain.conf.sample index 2d2b80a..a37168a 100644 --- a/pterodactyl.subdomain.conf.sample +++ b/pterodactyl.subdomain.conf.sample @@ -6,43 +6,43 @@ # make sure that your dns has a cname set for pterodactyl server { - listen 443 ssl; - listen [::]:443 ssl; + listen 443 ssl; + listen [::]:443 ssl; - server_name pterodactyl.*; + server_name pterodactyl.*; - include /config/nginx/ssl.conf; + include /config/nginx/ssl.conf; - client_max_body_size 0; + client_max_body_size 0; # enable for ldap auth (requires ldap-location.conf in the location block) - #include /config/nginx/ldap-server.conf; + #include /config/nginx/ldap-server.conf; - # enable for Authelia (requires authelia-location.conf in the location block) - #include /config/nginx/authelia-server.conf; + # enable for Authelia (requires authelia-location.conf in the location block) + #include /config/nginx/authelia-server.conf; - # enable for Authentik (requires authentik-location.conf in the location block) - #include /config/nginx/authentik-server.conf; + # enable for Authentik (requires authentik-location.conf in the location block) + #include /config/nginx/authentik-server.conf; - location / { - # enable the next two lines for http auth - #auth_basic "Restricted"; - #auth_basic_user_file /config/nginx/.htpasswd; + location / { + # enable the next two lines for http auth + #auth_basic "Restricted"; + #auth_basic_user_file /config/nginx/.htpasswd; - # enable for ldap auth (requires ldap-server.conf in the server block) - #include /config/nginx/ldap-location.conf; + # enable for ldap auth (requires ldap-server.conf in the server block) + #include /config/nginx/ldap-location.conf; - # enable for Authelia (requires authelia-server.conf in the server block) - #include /config/nginx/authelia-location.conf; + # enable for Authelia (requires authelia-server.conf in the server block) + #include /config/nginx/authelia-location.conf; - # enable for Authentik (requires authentik-server.conf in the server block) - #include /config/nginx/authentik-location.conf; - include /config/nginx/proxy.conf; - include /config/nginx/resolver.conf; - set $upstream_app pterodactyl; - set $upstream_port 80; - set $upstream_proto http; - proxy_pass $upstream_proto://$upstream_app:$upstream_port; - - } + # enable for Authentik (requires authentik-server.conf in the server block) + #include /config/nginx/authentik-location.conf; + include /config/nginx/proxy.conf; + include /config/nginx/resolver.conf; + set $upstream_app pterodactyl; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + + } } From 08ae51886b8c7943a5fabc9c1f91aa7f5d24f177 Mon Sep 17 00:00:00 2001 From: Jack D Date: Sat, 20 May 2023 01:28:20 +0100 Subject: [PATCH 6/7] Revert "Update pterodactyl.subdomain.conf.sample - attempt to fix whitespace" This reverts commit 8355cdc795ef6cf74b9ba5f7d67e65928e001a47. --- pterodactyl.subdomain.conf.sample | 56 +++++++++++++++---------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/pterodactyl.subdomain.conf.sample b/pterodactyl.subdomain.conf.sample index a37168a..2d2b80a 100644 --- a/pterodactyl.subdomain.conf.sample +++ b/pterodactyl.subdomain.conf.sample @@ -6,43 +6,43 @@ # make sure that your dns has a cname set for pterodactyl server { - listen 443 ssl; - listen [::]:443 ssl; + listen 443 ssl; + listen [::]:443 ssl; - server_name pterodactyl.*; + server_name pterodactyl.*; - include /config/nginx/ssl.conf; + include /config/nginx/ssl.conf; - client_max_body_size 0; + client_max_body_size 0; # enable for ldap auth (requires ldap-location.conf in the location block) - #include /config/nginx/ldap-server.conf; + #include /config/nginx/ldap-server.conf; - # enable for Authelia (requires authelia-location.conf in the location block) - #include /config/nginx/authelia-server.conf; + # enable for Authelia (requires authelia-location.conf in the location block) + #include /config/nginx/authelia-server.conf; - # enable for Authentik (requires authentik-location.conf in the location block) - #include /config/nginx/authentik-server.conf; + # enable for Authentik (requires authentik-location.conf in the location block) + #include /config/nginx/authentik-server.conf; - location / { - # enable the next two lines for http auth - #auth_basic "Restricted"; - #auth_basic_user_file /config/nginx/.htpasswd; + location / { + # enable the next two lines for http auth + #auth_basic "Restricted"; + #auth_basic_user_file /config/nginx/.htpasswd; - # enable for ldap auth (requires ldap-server.conf in the server block) - #include /config/nginx/ldap-location.conf; + # enable for ldap auth (requires ldap-server.conf in the server block) + #include /config/nginx/ldap-location.conf; - # enable for Authelia (requires authelia-server.conf in the server block) - #include /config/nginx/authelia-location.conf; + # enable for Authelia (requires authelia-server.conf in the server block) + #include /config/nginx/authelia-location.conf; - # enable for Authentik (requires authentik-server.conf in the server block) - #include /config/nginx/authentik-location.conf; - include /config/nginx/proxy.conf; - include /config/nginx/resolver.conf; - set $upstream_app pterodactyl; - set $upstream_port 80; - set $upstream_proto http; - proxy_pass $upstream_proto://$upstream_app:$upstream_port; - - } + # enable for Authentik (requires authentik-server.conf in the server block) + #include /config/nginx/authentik-location.conf; + include /config/nginx/proxy.conf; + include /config/nginx/resolver.conf; + set $upstream_app pterodactyl; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + + } } From 96e0323d825ebc7e0e818118bcef1da52328c518 Mon Sep 17 00:00:00 2001 From: Jack D <77021733+GetLifty@users.noreply.github.com> Date: Sat, 20 May 2023 01:35:42 +0100 Subject: [PATCH 7/7] Update pterodactylnode.subdomain.conf.sample - fix failing action check Co-authored-by: Eric Nemchik --- pterodactylnode.subdomain.conf.sample | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pterodactylnode.subdomain.conf.sample b/pterodactylnode.subdomain.conf.sample index 02803f2..e75e7dc 100644 --- a/pterodactylnode.subdomain.conf.sample +++ b/pterodactylnode.subdomain.conf.sample @@ -53,7 +53,7 @@ server { set $upstream_app pterodactylnode; set $upstream_port 443; set $upstream_proto http; - proxy_pass $upstream_proto://$upstream_app:$upstream_port/api/servers/$serverid/ws; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; } } \ No newline at end of file