PHP code example of jturbide / vhost

1. Go to this page and download the library: Download jturbide/vhost library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jturbide / vhost example snippets

yaml
sites:
- name: myapp.local
  root: MyApp/public/
  php: "83"
  variables:
  custom: |
      # Site-level directives
      php_value upload_max_filesize 128M

- name: admin.myapp.local
  root: MyApp/admin/public/
  aliases:
    - backoffice.myapp.local
      php: "83"
      variables:
      ssl_certificate: /etc/ssl/myapp.crt
      ssl_certificate_key: /etc/ssl/myapp.key
      custom: |
      # Admin-specific directives
bash
php bin/vhost.php [options]
bash
   php bin/vhost.php --no-backup
   
bash
   php bin/vhost.php --force --restart
   
bash
   php bin/vhost.php --clear-opcache --clear-apcu --clear-sessions
   
bash
   php bin/vhost.php --os=windows