Closed pouriap closed 1 year ago
Hello! You're welcome!
Yep some VPS'es have this problem.
You can however put the socket in any location you want, that has read/write access.
In both nginx and xray config (fallback destination). Change the path to whatever you prefer that is somewhat secure.
example in nginx
listen unix:/var/run/nginx/h1.sock proxy_protocol;
listen unix:/var/run/nginx/h2c.sock proxy_protocol;
or
listen unix:/tmp/nginx/h1.sock proxy_protocol;
listen unix:/tmp/nginx/h2c.sock proxy_protocol;
e.t.c
in xray config you need then to change to that fallback path Example
"dest":"/var/run/nginx/h1.sock",
if it does not work try another location.
Thanks that worked.
Hello and thanks for your comprehensive guide. I am having a problem starting nginx with your provided config file in my OpenVZ VPS. I get the following error when I run
systemctl restart nginx
:I'm not sure what this
unix:/dev/shm
listen address is but I Googled it and it seems it's some kind of memory sharing technique and I suspect maybe it's because I am using OpenVZ that I get this error because OpenVZ itself uses shared memory and is different from a real machine or KVM machines.