Question

Nginx another website

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


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @plescz40,

Looking at the Nginx configuration files, everything seems in order. I’ve even tested them and can confirm they are working.

The expected result might be different if you haven’t restarted your Nginx service or created the config in a sites-enabled dir in /etc/nginx.

Lastly, it’s possible your browser has chaced thus creating this issue for you.

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