Setup Zend
Setup Zend
Zend Framework is now Laminas. This example installs a Laminas MVC 3.x application with Composer from inside the Devilbox PHP container while keeping the historic page title for existing links.
example zend documentation
Overview
The following configuration will be used:
| Project name | VirtualHost directory | Database | TLD_SUFFIX | Project URL |
|---|---|---|---|---|
| my-zend | /shared/httpd/my-zend | n.a. | loc | http://my-zend.loc br https://my-zend.loc |
[!NOTE] Inside the Devilbox PHP container, projects are always in
/shared/httpd/. On your host, projects are stored in./data/www/by default. This path can be changed viaenv-httpd-datadir.
Walk through
It will be ready in six steps:
- Start Devilbox
- Enter the PHP container
- Create a new VirtualHost directory
- Install Laminas 3.x via Composer
- Symlink the webroot directory
- Configure DNS and open the site
1. Start Devilbox
host> ./dvl.sh up2. Enter the PHP container
All work will be done inside the PHP container:
host> ./dvl.sh shell* enter-the-php-container * work-inside-the-php-container *
available-tools
3. Create new vhost directory
The vhost directory defines the name under which your project will be available.
env-tld-suffix
4. Install Laminas 3.x
Install the Laminas MVC skeleton application:
[email protected] in /shared/httpd/my-zend $ composer create-project --prefer-dist laminas/laminas-mvc-skeleton laminasHow the directory structure looks after installation:
.└── laminas
1 directory, 0 files5. Symlink webroot
The web server expects every project document root in <vhost dir>/htdocs/.
Laminas keeps its entry point in public/, so symlink it to htdocs:
.├── laminas└── htdocs -> laminas/public
2 directories, 0 files6. DNS record and browser
If Auto DNS is configured you can skip the hosts entry. Otherwise add this line to your host operating system’s hosts file:
127.0.0.1 my-zend.locOpen http://my-zend.loc or https://my-zend.loc to see the Laminas welcome page.
howto-add-project-hosts-entry-on-machowto-add-project-hosts-entry-on-winsetup-auto-dns
Next steps
Use bundled batteries
* devilbox-intranet-adminer * devilbox-intranet-phpmyadmin *
devilbox-intranet-phppgadmin * devilbox-intranet-phpredmin *
devilbox-intranet-phpmemcachedadmin
Enhance the Devilbox
* setup-valid-https * setup-auto-dns * configure-php-xdebug
Add services
custom-container-enable-blackfirecustom-container-enable-rabbitmqcustom-container-enable-solrcustom-container-enable-varnish