#nginx help
83 messages · Page 1 of 1 (latest)
like what
bc on my mobilizen config it is commented out
mobilizon*
and there is no part for port 80
Can you send the entire .conf file?
ok.. it will take a sec
I'll be on PC in about 30min anyways, I'll be back then.
This is the default server block. Try this for your pterodactyl.conf and see if it works. If it does, you'll have narrowed the problem down to the pterodactyl server block.
server {
# Replace the example <domain> with your domain name or IP address
listen 80;
server_name 192.168.1.46;
root /var/www/pterodactyl/public;
index index.html index.htm index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
access_log off;
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;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTP_PROXY "";
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
}
location ~ /\.ht {
deny all;
}
}
nop same exact problem
i recrated the ticked bc i accidentally deleted this one
What is the output of ip a on your panel machine?
It looks like it's the right address and the server blocks look correct. I'm at a loss.
There's nothing I can see in the mobzilon.conf that would redirect traffic, but in case I'm wrong try renaming it to mobzilon.bak, restart nginx, and see if it works with that site disables.
Also are you using the default.conf for anything? The Pterodactyl Installation Docs say to delete it.
oh miss that
let me delete that
eb 12 19:58:26 linux5 systemd[1]: Reload failed for A high performance web server and a reverse proxy server.
nginx spits this pout when i reload
and fails
Maybe move the mobzilon.bak out of the folder entirely
Just the pterodactyl.conf in there
nginx -t should give you more information about what it doesn't like
nginx: [emerg] open() "/etc/nginx/sites-enabled/mobilizon.conf" failed (2: No such file or directory) in /etc/nginx/nginx.conf:64
What is in nginx.conf?
nginx: configuration file /etc/nginx/nginx.conf test failed```
It appears to be looking for it
as it should be i guess
Is mobzilon.conf referenced in /etc/nginx/nginx.conf? What does the file look like?
Is mobzilon.conf gone from both sites-enabled and sites-available?
not from enabled
Remove it from enabled too
done
I believe the sites-available one is a symbolic link to the one in sites-enabled
nginx -t
now reloads
Does the panel work?
no
Now that it can't redirect you to mobzilon, what is the error message?
i get rediricted to https://event1.dallh2o.com witch eas the old mobilizon external url
What ip are you using to connect to it?
192.168.1.46
huh
bc the only acces is in LAN
bc i do not want it on the internet
even with nginx stopped it does the same thing
Have you tried on a new private tab in your browser? It may just be old cache.
no
thnks god you hero
pld up
imma try putting the old configs
like the mobilizon
You can also try modfying the Pterodactyl.conf file so port 80 is specified, as so:
server {
listen 80;
listen [::]:80;
server_name 192.168.1.46;
root /var/www/pterodactyl/public;
index index.html index.htm index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
proxy_pass http://192.168.1.46:80;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
access_log off;
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;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTP_PROXY "";
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
}
location ~ /\.ht {
deny all;
}
}
I just added the port here: proxy_pass http://192.168.1.46:80;
I have found the following for: https://media.discordapp.net/attachments/1074383095710621777/1074407651519238185/image.png
You will normally see 502 bad gateway error when php-fpm can't be reached by your web server. This can be due to a wrong path, it not running or wrong permissions. Confirm that it is running and using the correct php-fpm version in the config pterodactyl.conf file. It would be attempting to use PHP 8.1 by default. When using other PHP versions, make sure to change the php-fpm version in your config to match your used PHP version.
Not sure where to find the server block file? Type .webconf and I will respond with more instructions. Web server error logs can provide additional details.
huh
done it just added /auth/login to the proxy_pass
Nice
Now you should be good to add the mobzilon.conf back
now i have to diagnose MOB
arlady done
THANKS A LOT
No problem