#I can't manage to get my nginx routing configuration working with pterodactyl and another www.
34 messages · Page 1 of 1 (latest)
Why have you got .etercraft.pl in the server_name for the panel ?
Even if i delete it, still does not work :< i found some answer on stackoverflow to do that and i tried
server {
listen 80;
listen [::]:80;
server_name etercraft.pl;
root /var/www/spaceis/public;
server {
listen 80;
server_name etercraft.pl;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
server_name panel.etercraft.pl;
Even with this config it still does not work
Where is your ssl server block for etercraft.pl ?
ohh okay
i see now
ssl_certificate /etc/letsencrypt/live/etercraft.pl/fullchain.pem;
for pterodactyl panel
thats why it might not work right?
You're redirecting to ssl, but you have no ssl block covering that domain. So you need to add a server block for etercraft.pl with ssl
Okay, so server {
listen 443 ssl http2;
server_name panel.etercraft.pl;
root /var/www/pterodactyl/public;
index index.php;
access_log /var/log/nginx/pterodactyl.app-access.log;
error_log /var/log/nginx/pterodactyl.app-error.log error;
# allow larger file uploads and longer script runtimes
client_max_body_size 100m;
client_body_timeout 120s;
sendfile off;
# SSL Configuration - Replace the example <domain> with your domain
ssl_certificate /etc/letsencrypt/live/etercraft.pl/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/etercraft.pl/privkey.pem;
ssl_session_cache shared:SSL:10m;
ssl_protocols TLSv1.2 TLSv1.3;
thats configured good? or do i need to change that ssl to panel.etercraft.pl?
No, you need to ADD an SSL capable server block for etercraft.pl
Thats not the right listen port for SSL
Yeah, you need one of those to cover etercraft.pl