Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

nginx conf per host in phalcon vagrant

I have just installed https://github.com/phalcon/box.

Is there a way to set an nginx.conf per site like Homestead allows it? For instance in Homestead you can specify something like:

 - map: slayer.home
   to: /home/vagrant/Code/slayer/public      
   type: slayer

and this creates a serve-slayer.sh

Hello,

Could you please create New Feature Request (NFR) at GitHub repo?



29.2k
Accepted
answer

Implemented in the 2.1.0 version.

You can use the type parameter to specify the type of Nginx configuration for the site. For example:

sites:
    - map:  landing.local
      to:   /home/vagrant/workspace/landing/public
      type: spa

The default type is phalcon.

If the desired type is not allowed phalcon will be used as fallback.

Available types:

  • phalcon
  • slayer
  • proxy
  • spa
  • silverstripe
  • symfony2
  • statamic
  • laravel

Feel free to suggest a new type of Nginx configuration through opening a New Feature Request.

If you change the sites property after provisioning the Phalcon Box, you should re-run vagrant reload --provision to update the Nginx configuration on the virtual machine.