Question

Nginx another website

Posted April 4, 2021 38 views
Nginx

Hi guyss

When I want to create another site on nginx and go to that site (https://mefloun.eu), it redirects me to the pterodactyl panel on https://admin.mefloun.eu

Don’t know where the problem may be?

Pterodactyl nginx config: https://pastebin.com/TZTgAjua
Another site nginx config: https://pastebin.com/aaffyPj2

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi there,

I just tested the websites and they both seem to be working as expected. Would you mind sharing here with the community how you got this working?

Usually, this could be caused by a few main reasons:

  • The permissions of the document root of the new site are not setup correctly, and the Nginx user is unable to read the files of the new site. You need to use the chown command to change ownership of the files and folders to match the Nginx user
  • The new site does not have an SSL certificate, so when you visit the site via https it is redirected to the only site that has an SSL
  • You would need to make sure to clear your browser cache as quite often the redirect would be cached

Regards,
Bobby