![]() |
|---|
| Nginx |
The installation is handled by composer and you can install it either globally or locally.
Require the library globally by executing:
composer global require nass600/portiere 0.4.0and add composer global package binaries to your PATH if you didn't yet:
echo "export PATH=~/.composer/vendor/bin:$PATH" >> ~/.bashrcYou are ready to go by running wherever you want the commands vhost-createand vhost-delete
Require the library by executing:
composer require-dev nass600/portiere 0.4.0You are ready to go by running from the root of your project the commands bin/vhost-createand bin/vhost-delete
Note: You probably need sudo permissions for executing this commands successfully
Lists all the virtual hosts
portiere vhost:listThis command will:
- Create a virtual host file named
serverNameorvhost-filenameif set - Create an error log file named
vhost-filename.error.logand an access log file namedvhost-filename.access.login the web server default logs directory - Enable the virtual host
- Restart the web server
portiere vhost:create dev.example.com /home/user/sites/project/webArguments
| argument | description |
|---|---|
| serverName | The server name of the virtual host |
| documentRoot | The directory holding the front controller php file |
Options
| option | default | description |
|---|---|---|
| --vhost-filename, -vf | {{serverName}} | The virtual host filename |
| --no-dev | Don't add development environment to vhost file |
This command will:
- Remove the virtual host file named
vhostFilename - Remove both access and error log files from the web server default logs directory
- Disable the virtual host
- Restart the web server
portiere vhost:delete dev.example.comArguments
| argument | description |
|---|---|
| vhostFilename | The virtual host filename |
- Support more web servers
- Improve tests

