Nginx directory configuration
Nginx directory configuration
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:
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.
Code: Select all
location / {
try_files $uri $uri/ /index.php?_url=$uri&$args;
}
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.
-
- Collaborator
- Posts: 783
- Joined: Mon May 11, 2015 8:43 am
- Contact:
- Os: CentOS 6x
- Web: apache + nginx
Re: Nginx directory configuration
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
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
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.
It will work just fine. Hope the file is never replaced.