Page 1 of 1

I modified location in nginx config, now VestaCP gives internalerror 505?

Posted: Fri Oct 28, 2016 5:35 pm
by embo
I modified location / in vesta config for wordpress permalinks, it worked and now my permalinks are working. ( I used this tutorial http://nginxlibrary.com/wordpress-permalinks/ )

But it broke the vestacp , the login page doesn't load, when i go to the login page it says internal error and i can't do anything. Even if i revert what i did, it is not working )

First I accidentally first modified the location in the config file, /usr/local/vesta/nginx/conf/nginx.config

Which didnt work and i didnt back it up, which is like this right now,

location / {
try_files $uri $uri/ /index.php?$args;
}
if anyone has the original code please share with me.

And then i modified the right file which is in /home/admin/conf/web/nginx.config and permalinks started working.

But vestaCP is not working now.

What should i do?

Re: I modified location in nginx config, now VestaCP gives internalerror 505?

Posted: Fri Oct 28, 2016 7:42 pm
by mehargags
state your OS, version and Vesta config (nginx+apache or nginx+PHP-FPM)

Re: I modified location in nginx config, now VestaCP gives internalerror 505?

Posted: Fri Oct 28, 2016 9:13 pm
by embo
Its Centos 7, nginx - phpfm

Re: I modified location in nginx config, now VestaCP gives internalerror 505?

Posted: Sat Oct 29, 2016 6:05 am
by mehargags
compare or replace the file from the repo https://github.com/serghey-rodin/vesta/ ... nginx.conf

Re: I modified location in nginx config, now VestaCP gives internalerror 505?

Posted: Sun Oct 30, 2016 6:42 pm
by embo
I did,

Now vestaCP wont start after reboot, here is what i get.



vesta.service - SYSV: Run vesta web server
Loaded: loaded (/etc/rc.d/init.d/vesta)
Active: failed (Result: exit-code) since Sun 2016-10-30 14:28:03 EDT; 6min ag o
Docs: man:systemd-sysv-generator(8)
Process: 3874 ExecStart=/etc/rc.d/init.d/vesta start (code=exited, status=1/FA ILURE)

Oct 30 14:28:03 server systemd[1]: Starting SYSV: Run vesta web s....
Oct 30 14:28:03 server vesta[3874]: Starting vesta-nginx: nginx: ...2
Oct 30 14:28:03 server vesta[3874]: [FAILED]
Oct 30 14:28:03 server systemd[1]: vesta.service: control process...1
Oct 30 14:28:03 server systemd[1]: Failed to start SYSV: Run vest....
Oct 30 14:28:03 server systemd[1]: Unit vesta.service entered fai....
Oct 30 14:28:03 server systemd[1]: vesta.service failed.

Re: I modified location in nginx config, now VestaCP gives internalerror 505?

Posted: Sun Oct 30, 2016 7:11 pm
by mehargags
how many sites you have on this server ?
I suggest you backup your sites/DB first... and copy them offsite somewhere.
then
Check and post these logs

Code: Select all

/var/log/vesta/system.log
/var/log/vesta/backup.log
/var/log/vesta/auth.log
/var/log/vesta/nginx-error.log
/usr/local/vesta/php/var/log/php-fpm.log

You may get some hint from it
or

Try updating whole vesta from github.

If you still can't get it to work, I suggest you (backup sites and DBs) wash your server and clean install OS and Vesta and sites+DB. DO NOT "restore" from a VestaCP backup or else you may have corrupted configs again.

Good luck