Question

Symlink: Access with NGINX to root folder files

Hello dear community. Im just going to be clear.

I’ve just installed nginx running on Debian 10. However, Im running a game server which is located at root directory and Im trying to access to one of the folder of the game server (Located at root Example: /root/gameserver/shareFolder). However, I have been reading and triying to find a way to access there via a Symlink, however it was not possible unless I use the following command

sudo chmod a+X /root

As far as I read is not a good choice to use/keep that command.

On the one hand I have tried to change the folder ownership but sadly it drops 404 Error or 403. On the other I have also tried to create a location in a .config file.

I know I can move the game server folder and files to another secure directory, but, which one should be the correct one? And which one can access with nginx user to a symlink of it?

First of all I’m so sorry if I didnt explained pretty well. Im not an expert coder and english is not my strong suit. Thanks in advance, regards.


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 there @Oversito,

The explanation of the problem is perfect!

I would recommend moving the game server installation to the /var/www/ folder, for example, you can move it to /var/www/gameserver.

To be on the safe side, I would recommend taking a snapshot of your Droplet before making the change, that way if anything breaks, you would be able to revert to the working version.

Hope that this helps! Regards, Bobby