Can I have a root path that contains spaces in my nginx.conf?

I have tried escaping (instead of escaping), (and without) single quotes and double qoutes but I am always on the 404 page.

Is it even possible? I tried to look for it, but landed https://serverfault.com/questions/361915/how-can-i-make-nginx-recognise-directories-with-spaces-in-its-name but I have already tried, It is useless.

If I am just me, then please prove to me:)

I also encountered this problem. As long as I did not escape the spaces and used single or double quotes, I could use the root path with spaces.

The following works

< p>

root "/directory/with spaces not escaped/will work"

This does not work

root "/ directory/with\ escaped\ spaces/will\ not\ work"

I have tried escaping (not escaping), (and without) single quotes and double qoutes but I am always on a 404 page.

Is it even possible? I tried to look for it, but landed https://serverfault.com/questions/361915/how-can-i-make-nginx-recognise-directories-with-spaces-in-its-name but I have already tried, It is useless.

If I am just me, then please prove to me:)

I also encountered this problem. As long as I Without escaping the spaces and using single or double quotes, I can use the root path with spaces.

The following works

root "/ directory/with spaces not escaped/will work"

This does not work

root "/directory/with\ escaped\ spaces/will\ not\ work"

Leave a Comment

Your email address will not be published.