Page 1 of 1

nginx restart failed (caching template)

Posted: Tue Dec 29, 2015 5:12 pm
by hedgehog90
I'm running Ubuntu 14.04 and Vesta 0.9.8

Whenever I try to run v-rebuild-user or service nginx restart I get this error:
Error: nginx restart failed

If I check the error log I see this:

Code: Select all

nginx: [emerg] the same path name "/var/cache/nginx/gpstudios.com" used in /etc/nginx/conf.d/01_caching_pool.conf:1 and in /etc/nginx/conf.d/01_caching_pool.conf:2
nginx: configuration file /etc/nginx/nginx.conf test failed
and my /etc/nginx/conf.d/01_caching_pool.conf contains:

Code: Select all

proxy_cache_path /var/cache/nginx/gpstudios.com levels=2 keys_zone=gpstudios.com:10m inactive=60m max_size=512m;
proxy_cache_path /var/cache/nginx/gpstudios.com levels=2 keys_zone=gpstudios.com:10m inactive=60m max_size=512m;
If I delete /etc/nginx/conf.d/01_caching_pool.conf I can run v-rebuild-user once, but then if I try to run it again it has the same error.
At one point, during my fiddling trying to debug it, the file consisted of 5 repeated lines insetad of 2.

It appears this file is getting ammended the same line every time I rebuild the user.

Why is this happening? It works if I delete 01_caching_pool.conf but this is not a clean solution.

Re: nginx restart failed (caching template)

Posted: Sun Jan 24, 2016 4:56 pm
by abrarahmed
I hope this helps
Open

Code: Select all

/etc/nginx/conf.d/01_caching_pool.conf
and remove all the duplicate lines. And then restart nginx.

Re: nginx restart failed (caching template)

Posted: Sat Sep 02, 2017 12:11 pm
by ahouse
i have the same problem. When i am select a "caching" profile - nginx goes down.

Re: nginx restart failed (caching template)

Posted: Mon Sep 18, 2017 2:51 pm
by MiguelVESTACP
abrarahmed wrote:I hope this helps
Open

Code: Select all

/etc/nginx/conf.d/01_caching_pool.conf
and remove all the duplicate lines. And then restart nginx.
After change Proxy Template same problem 3 lines with the same in

Code: Select all

/etc/nginx/conf.d/01_caching_pool.conf
After delete 2 lines and only stays 1 everthing goes ok.

This is a bug?

Re: nginx restart failed (caching template)

Posted: Mon Sep 18, 2017 3:01 pm
by Spythe
My experience for the past few months is when you choose a different template, nginx.conf and .conf files just get fucked up for no reason. Vesta is pretty bugged, imho..

Re: nginx restart failed (caching template)

Posted: Mon Sep 18, 2017 7:03 pm
by imperio