Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Nginx directory configuration

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
3 posts • Page 1 of 1
Swift-R
Posts: 4
Joined: Tue Feb 16, 2016 9:18 pm

Nginx directory configuration
  • Quote

Post by Swift-R » Tue Feb 16, 2016 9:24 pm

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.
Top

tjebbeke
Collaborator
Posts: 783
Joined: Mon May 11, 2015 8:43 am
Contact:
Contact tjebbeke
Website

Os: CentOS 6x
Web: apache + nginx
Re: Nginx directory configuration
  • Quote

Post by tjebbeke » Tue Feb 16, 2016 10:52 pm

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
Top

Swift-R
Posts: 4
Joined: Tue Feb 16, 2016 9:18 pm

Re: Nginx directory configuration
  • Quote

Post by Swift-R » Tue Feb 16, 2016 11:28 pm

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.
Top


Post Reply
  • Print view

3 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password