#I can't manage to get my nginx routing configuration working with pterodactyl and another www.

34 messages · Page 1 of 1 (latest)

karmic vigilBOT
#

There were too many logs to read @sharp solar. Please post 5 or less. Alternatively, please share larger logs using paste sites, such as pteropaste or hastebin.

safe ravine
#

Why have you got .etercraft.pl in the server_name for the panel ?

sharp solar
#

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

safe ravine
sharp solar
#

ohh okay

#

i see now

#

ssl_certificate /etc/letsencrypt/live/etercraft.pl/fullchain.pem;

#

for pterodactyl panel

#

thats why it might not work right?

safe ravine
#

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

sharp solar
#

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;
safe ravine
#

No, you need to ADD an SSL capable server block for etercraft.pl

sharp solar
#

Okaay

#

that's okay? or do i understood something wrong

safe ravine
#

Thats not the right listen port for SSL

sharp solar
#

ohhhhh

#

okayyyy

#

i understand

#

like this whole block

safe ravine
sharp solar
#

Okay

#

It chagned now but

#

do u know why it might download weird files when i enter the domain now?

#

is it the server-side problem with the site?

#

or something with ssl

#

kinda weird

#

Okay i figured that out