Page 1 of 1

Nginx directory configuration

Posted: Tue Feb 16, 2016 9:24 pm
by Swift-R
I use some PHP Frameworks that require custom Nginx configurations. In Phalcon PHP Framework I need to change the root to the public directory and also add:

Code: Select all

location / {
    try_files $uri $uri/ /index.php?_url=$uri&$args;
}
to the server section in the website .conf file.

What is the best way to accomplish this with Vesta? If possible in a way that when I make a change to the website in Vesta it does not lose the configuration.

Re: Nginx directory configuration

Posted: Tue Feb 16, 2016 10:52 pm
by tjebbeke
You can change the config in /home/yourusername/conf/web/nginx.conf, but every time you edit something about this domain in the web section of Vesta your custom configuration is overwritten.

Or you can try to add your custom configuration in /home/yourusername/conf/web/nginx.yourdomain.com.conf.
https://github.com/serghey-rodin/vesta/ ... ng.tpl#L33

Re: Nginx directory configuration

Posted: Tue Feb 16, 2016 11:28 pm
by Swift-R
That file does not exist. I suppose that include is meant for us to do exactly what I need without messing with Vesta config files?

It will work just fine. Hope the file is never replaced.