mirror of
https://github.com/cytopia/devilbox.git
synced 2025-06-11 11:51:49 +00:00
DVL-012 Fix contradictory TLD_SUFFIX documentation to default to *.loc
This commit is contained in:
parent
d4d3e1223d
commit
6a9d248c4a
@ -185,7 +185,7 @@ The devilbox has everything setup for you. The only thing you will have to insta
|
|||||||
#### Features
|
#### Features
|
||||||
|
|
||||||
* **Mass virtual host**
|
* **Mass virtual host**
|
||||||
* **Custom domains** (`*.loc`, `*.local`, `*.dev`, ...)
|
* **Custom domains** (`*.loc`, `*.local`, `*.dev`, `*.sub.loc`, ...)
|
||||||
* **Auto-DNS** (Internal Bind server running)
|
* **Auto-DNS** (Internal Bind server running)
|
||||||
* **Email catch-all** (Internal postfix with catch-all)
|
* **Email catch-all** (Internal postfix with catch-all)
|
||||||
* **Log files** (available on host computer)
|
* **Log files** (available on host computer)
|
||||||
|
@ -54,7 +54,7 @@ The following configuration will be used:
|
|||||||
|
|
||||||
| Project name | VirtualHost directory | Database | TLD_SUFFIX | Url |
|
| Project name | VirtualHost directory | Database | TLD_SUFFIX | Url |
|
||||||
|--------------|-----------------------|------------|------------|-----|
|
|--------------|-----------------------|------------|------------|-----|
|
||||||
| my-cake | /shared/httpd/my-cake | my_cake | local | http://my-cake.local |
|
| my-cake | /shared/httpd/my-cake | my_cake | loc | http://my-cake.loc |
|
||||||
|
|
||||||
It will be ready in eight simple steps:
|
It will be ready in eight simple steps:
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ It will be ready in eight simple steps:
|
|||||||
5. Add MySQL database
|
5. Add MySQL database
|
||||||
6. Configure datbase connection
|
6. Configure datbase connection
|
||||||
7. Setup DNS record
|
7. Setup DNS record
|
||||||
8. Visit http://my-cake.local in your browser
|
8. Visit http://my-cake.loc in your browser
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# 1. Enter the PHP container
|
# 1. Enter the PHP container
|
||||||
@ -113,12 +113,12 @@ devilbox@php-7.0.20 in /shared/httpd $ vi cakephp/config/app.php
|
|||||||
|
|
||||||
If you do not have auto-DNS configured, you will need to add the following line to your Host computer's `/etc/hosts`:
|
If you do not have auto-DNS configured, you will need to add the following line to your Host computer's `/etc/hosts`:
|
||||||
```shell
|
```shell
|
||||||
127.0.0.1 my-cake.local
|
127.0.0.1 my-cake.loc
|
||||||
```
|
```
|
||||||
|
|
||||||
**8. Open your browser**
|
**8. Open your browser**
|
||||||
|
|
||||||
All set now, you can visit http://my-cake.local in your browser.
|
All set now, you can visit http://my-cake.loc in your browser.
|
||||||
|
|
||||||
|
|
||||||
## 3. Setup Drupal
|
## 3. Setup Drupal
|
||||||
@ -129,7 +129,7 @@ The following configuration will be used:
|
|||||||
|
|
||||||
| Project name | VirtualHost directory | Database | TLD_SUFFIX | Url |
|
| Project name | VirtualHost directory | Database | TLD_SUFFIX | Url |
|
||||||
|--------------|-----------------------|------------|------------|-----|
|
|--------------|-----------------------|------------|------------|-----|
|
||||||
| my-drupal | /shared/httpd/my-drupal | my_drupal| local | http://my-drupal.local |
|
| my-drupal | /shared/httpd/my-drupal | my_drupal| loc | http://my-drupal.loc |
|
||||||
|
|
||||||
It will be ready in six simple steps:
|
It will be ready in six simple steps:
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ It will be ready in six simple steps:
|
|||||||
3. Install Drupal via `drush`
|
3. Install Drupal via `drush`
|
||||||
4. Symlink Drupal directory
|
4. Symlink Drupal directory
|
||||||
5. Setup DNS record
|
5. Setup DNS record
|
||||||
6. Visit http://my-drupal.local in your browser and follow instructions
|
6. Visit http://my-drupal.loc in your browser and follow instructions
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# 1. Enter the PHP container
|
# 1. Enter the PHP container
|
||||||
@ -159,12 +159,12 @@ devilbox@php-7.0.20 in /shared/httpd $ ln -s drupal-8.3.3 htdocs
|
|||||||
|
|
||||||
If you do not have auto-DNS configured, you will need to add the following line to your Host computer's `/etc/hosts`:
|
If you do not have auto-DNS configured, you will need to add the following line to your Host computer's `/etc/hosts`:
|
||||||
```shell
|
```shell
|
||||||
127.0.0.1 my-drupal.local
|
127.0.0.1 my-drupal.loc
|
||||||
```
|
```
|
||||||
|
|
||||||
**6. Open your browser**
|
**6. Open your browser**
|
||||||
|
|
||||||
Open your browser at http://my-drupal.local and follow the Drupal installation steps.
|
Open your browser at http://my-drupal.loc and follow the Drupal installation steps.
|
||||||
|
|
||||||
**Note:** For MySQL host choose `127.0.0.1`.
|
**Note:** For MySQL host choose `127.0.0.1`.
|
||||||
|
|
||||||
@ -177,7 +177,7 @@ The following configuration will be used:
|
|||||||
|
|
||||||
| Project name | VirtualHost directory | Database | TLD_SUFFIX | Url |
|
| Project name | VirtualHost directory | Database | TLD_SUFFIX | Url |
|
||||||
|--------------|-----------------------|------------|------------|-----|
|
|--------------|-----------------------|------------|------------|-----|
|
||||||
| my-laravel | /shared/httpd/my-laravel | - | local | http://my-laravel.local |
|
| my-laravel | /shared/httpd/my-laravel | - | loc | http://my-laravel.loc |
|
||||||
|
|
||||||
It will be ready in six simple steps:
|
It will be ready in six simple steps:
|
||||||
|
|
||||||
@ -186,7 +186,7 @@ It will be ready in six simple steps:
|
|||||||
3. Install Laravel via `laravel`
|
3. Install Laravel via `laravel`
|
||||||
4. Symlink public directory
|
4. Symlink public directory
|
||||||
5. Setup DNS record
|
5. Setup DNS record
|
||||||
6. Visit http://my-laravel.local in your browser
|
6. Visit http://my-laravel.loc in your browser
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# 1. Enter the PHP container
|
# 1. Enter the PHP container
|
||||||
@ -207,12 +207,12 @@ devilbox@php-7.0.20 in /shared/httpd $ ln -s laravel-project/public htdocs
|
|||||||
|
|
||||||
If you do not have auto-DNS configured, you will need to add the following line to your Host computer's `/etc/hosts`:
|
If you do not have auto-DNS configured, you will need to add the following line to your Host computer's `/etc/hosts`:
|
||||||
```shell
|
```shell
|
||||||
127.0.0.1 my-laravel.local
|
127.0.0.1 my-laravel.loc
|
||||||
```
|
```
|
||||||
|
|
||||||
**6. Open your browser**
|
**6. Open your browser**
|
||||||
|
|
||||||
Open your browser at http://my-laravel.local
|
Open your browser at http://my-laravel.loc
|
||||||
|
|
||||||
|
|
||||||
## 5. Setup Phalcon
|
## 5. Setup Phalcon
|
||||||
@ -223,7 +223,7 @@ The following configuration will be used:
|
|||||||
|
|
||||||
| Project name | VirtualHost directory | Database | TLD_SUFFIX | Url |
|
| Project name | VirtualHost directory | Database | TLD_SUFFIX | Url |
|
||||||
|--------------|-----------------------|------------|------------|-----|
|
|--------------|-----------------------|------------|------------|-----|
|
||||||
| my-phalcon | /shared/httpd/my-phalcon | - | local | http://my-phalcon.local |
|
| my-phalcon | /shared/httpd/my-phalcon | - | loc | http://my-phalcon.loc |
|
||||||
|
|
||||||
It will be ready in six simple steps:
|
It will be ready in six simple steps:
|
||||||
|
|
||||||
@ -232,7 +232,7 @@ It will be ready in six simple steps:
|
|||||||
3. Install Phalcon via `phalcon`
|
3. Install Phalcon via `phalcon`
|
||||||
4. Symlink public directory
|
4. Symlink public directory
|
||||||
5. Setup DNS record
|
5. Setup DNS record
|
||||||
6. Visit http://my-phalcon.local in your browser
|
6. Visit http://my-phalcon.loc in your browser
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# 1. Enter the PHP container
|
# 1. Enter the PHP container
|
||||||
@ -253,12 +253,12 @@ devilbox@php-7.0.20 in /shared/httpd $ ln -s phalconphp/public htdocs
|
|||||||
|
|
||||||
If you do not have auto-DNS configured, you will need to add the following line to your Host computer's `/etc/hosts`:
|
If you do not have auto-DNS configured, you will need to add the following line to your Host computer's `/etc/hosts`:
|
||||||
```shell
|
```shell
|
||||||
127.0.0.1 my-phalcon.local
|
127.0.0.1 my-phalcon.loc
|
||||||
```
|
```
|
||||||
|
|
||||||
**6. Open your browser**
|
**6. Open your browser**
|
||||||
|
|
||||||
Open your browser at http://my-phalcon.local
|
Open your browser at http://my-phalcon.loc
|
||||||
|
|
||||||
|
|
||||||
## 6. Setup Symfony
|
## 6. Setup Symfony
|
||||||
@ -269,7 +269,7 @@ The following configuration will be used:
|
|||||||
|
|
||||||
| Project name | VirtualHost directory | Database | TLD_SUFFIX | Url |
|
| Project name | VirtualHost directory | Database | TLD_SUFFIX | Url |
|
||||||
|--------------|-----------------------|------------|------------|-----|
|
|--------------|-----------------------|------------|------------|-----|
|
||||||
| my-symfony | /shared/httpd/my-symfony | - | local | http://my-symfony.local |
|
| my-symfony | /shared/httpd/my-symfony | - | loc | http://my-symfony.loc |
|
||||||
|
|
||||||
It will be ready in six simple steps:
|
It will be ready in six simple steps:
|
||||||
|
|
||||||
@ -279,7 +279,7 @@ It will be ready in six simple steps:
|
|||||||
4. Symlink web directory
|
4. Symlink web directory
|
||||||
5. Enable Symfony prod (app.php)
|
5. Enable Symfony prod (app.php)
|
||||||
6. Setup DNS record
|
6. Setup DNS record
|
||||||
7. Visit http://my-symfony.local in your browser
|
7. Visit http://my-symfony.loc in your browser
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# 1. Enter the PHP container
|
# 1. Enter the PHP container
|
||||||
@ -304,12 +304,12 @@ devilbox@php-7.0.20 in /shared/httpd $ ln -s app.php index.php
|
|||||||
|
|
||||||
If you do not have auto-DNS configured, you will need to add the following line to your Host computer's `/etc/hosts`:
|
If you do not have auto-DNS configured, you will need to add the following line to your Host computer's `/etc/hosts`:
|
||||||
```shell
|
```shell
|
||||||
127.0.0.1 my-symfony.local
|
127.0.0.1 my-symfony.loc
|
||||||
```
|
```
|
||||||
|
|
||||||
**7. Open your browser**
|
**7. Open your browser**
|
||||||
|
|
||||||
Open your browser at http://my-symfony.local
|
Open your browser at http://my-symfony.loc
|
||||||
|
|
||||||
|
|
||||||
## 7. Setup Wordpress
|
## 7. Setup Wordpress
|
||||||
@ -320,7 +320,7 @@ The following configuration will be used:
|
|||||||
|
|
||||||
| Project name | VirtualHost directory | Database | TLD_SUFFIX | Url |
|
| Project name | VirtualHost directory | Database | TLD_SUFFIX | Url |
|
||||||
|--------------|-----------------------|------------|------------|-----|
|
|--------------|-----------------------|------------|------------|-----|
|
||||||
| my-wp | /shared/httpd/my-wp | my_wp | local | http://my-wp.local |
|
| my-wp | /shared/httpd/my-wp | my_wp | loc | http://my-wp.loc |
|
||||||
|
|
||||||
It will be ready in six simple steps:
|
It will be ready in six simple steps:
|
||||||
|
|
||||||
@ -329,7 +329,7 @@ It will be ready in six simple steps:
|
|||||||
3. Download Wordpress via `git`
|
3. Download Wordpress via `git`
|
||||||
4. Symlink wordpress git directory
|
4. Symlink wordpress git directory
|
||||||
5. Setup DNS record
|
5. Setup DNS record
|
||||||
6. Visit http://my-wp.local in your browser
|
6. Visit http://my-wp.loc in your browser
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# 1. Enter the PHP container
|
# 1. Enter the PHP container
|
||||||
@ -350,12 +350,12 @@ devilbox@php-7.0.20 in /shared/httpd $ ln -s wordpress.git htdocs
|
|||||||
|
|
||||||
If you do not have auto-DNS configured, you will need to add the following line to your Host computer's `/etc/hosts`:
|
If you do not have auto-DNS configured, you will need to add the following line to your Host computer's `/etc/hosts`:
|
||||||
```shell
|
```shell
|
||||||
127.0.0.1 my-wp.local
|
127.0.0.1 my-wp.loc
|
||||||
```
|
```
|
||||||
|
|
||||||
**6. Open your browser**
|
**6. Open your browser**
|
||||||
|
|
||||||
Open your browser at http://my-wp.local
|
Open your browser at http://my-wp.loc
|
||||||
|
|
||||||
|
|
||||||
## 8. Setup Yii
|
## 8. Setup Yii
|
||||||
@ -366,7 +366,7 @@ The following configuration will be used:
|
|||||||
|
|
||||||
| Project name | VirtualHost directory | Database | TLD_SUFFIX | Url |
|
| Project name | VirtualHost directory | Database | TLD_SUFFIX | Url |
|
||||||
|--------------|-----------------------|------------|------------|-----|
|
|--------------|-----------------------|------------|------------|-----|
|
||||||
| my-yii | /shared/httpd/my-yii | - | local | http://my-yii.local |
|
| my-yii | /shared/httpd/my-yii | - | loc | http://my-yii.loc |
|
||||||
|
|
||||||
It will be ready in six simple steps:
|
It will be ready in six simple steps:
|
||||||
|
|
||||||
@ -375,7 +375,7 @@ It will be ready in six simple steps:
|
|||||||
3. Install Yii2 via `composer`
|
3. Install Yii2 via `composer`
|
||||||
4. Symlink web directory
|
4. Symlink web directory
|
||||||
5. Setup DNS record
|
5. Setup DNS record
|
||||||
6. Visit http://my-yii.local in your browser
|
6. Visit http://my-yii.loc in your browser
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# 1. Enter the PHP container
|
# 1. Enter the PHP container
|
||||||
@ -396,12 +396,12 @@ devilbox@php-7.0.20 in /shared/httpd $ ln -s yii2-dev/web htdocs
|
|||||||
|
|
||||||
If you do not have auto-DNS configured, you will need to add the following line to your Host computer's `/etc/hosts`:
|
If you do not have auto-DNS configured, you will need to add the following line to your Host computer's `/etc/hosts`:
|
||||||
```shell
|
```shell
|
||||||
127.0.0.1 my-yii.local
|
127.0.0.1 my-yii.loc
|
||||||
```
|
```
|
||||||
|
|
||||||
**6. Open your browser**
|
**6. Open your browser**
|
||||||
|
|
||||||
Open your browser at http://my-yii.local
|
Open your browser at http://my-yii.loc
|
||||||
|
|
||||||
|
|
||||||
## 9. Setup Zend
|
## 9. Setup Zend
|
||||||
@ -412,7 +412,7 @@ The following configuration will be used:
|
|||||||
|
|
||||||
| Project name | VirtualHost directory | Database | TLD_SUFFIX | Url |
|
| Project name | VirtualHost directory | Database | TLD_SUFFIX | Url |
|
||||||
|--------------|-----------------------|------------|------------|-----|
|
|--------------|-----------------------|------------|------------|-----|
|
||||||
| my-zend | /shared/httpd/my-zend | - | local | http://my-zend.local |
|
| my-zend | /shared/httpd/my-zend | - | loc | http://my-zend.loc |
|
||||||
|
|
||||||
It will be ready in six simple steps:
|
It will be ready in six simple steps:
|
||||||
|
|
||||||
@ -421,7 +421,7 @@ It will be ready in six simple steps:
|
|||||||
3. Install Zendframework via `composer`
|
3. Install Zendframework via `composer`
|
||||||
4. Symlink public directory
|
4. Symlink public directory
|
||||||
5. Setup DNS record
|
5. Setup DNS record
|
||||||
6. Visit http://my-zend.local in your browser
|
6. Visit http://my-zend.loc in your browser
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# 1. Enter the PHP container
|
# 1. Enter the PHP container
|
||||||
@ -442,9 +442,9 @@ devilbox@php-7.0.20 in /shared/httpd $ ln -s zend/public htdocs
|
|||||||
|
|
||||||
If you do not have auto-DNS configured, you will need to add the following line to your Host computer's `/etc/hosts`:
|
If you do not have auto-DNS configured, you will need to add the following line to your Host computer's `/etc/hosts`:
|
||||||
```shell
|
```shell
|
||||||
127.0.0.1 my-zend.local
|
127.0.0.1 my-zend.loc
|
||||||
```
|
```
|
||||||
|
|
||||||
**6. Open your browser**
|
**6. Open your browser**
|
||||||
|
|
||||||
Open your browser at http://my-zend.local
|
Open your browser at http://my-zend.loc
|
||||||
|
84
docs/FAQ.md
84
docs/FAQ.md
@ -18,6 +18,14 @@ FAQ
|
|||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
|
|
||||||
|
1. [General](#1-general)
|
||||||
|
2. [Configuration](#2-configuration)
|
||||||
|
3. [Usage](#3-usage)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. General
|
||||||
|
|
||||||
**Are there any differences between Linux, Windows and OSX?**
|
**Are there any differences between Linux, Windows and OSX?**
|
||||||
|
|
||||||
Yes, have a look at **[OS](OS.md)** to read up about the differences.
|
Yes, have a look at **[OS](OS.md)** to read up about the differences.
|
||||||
@ -38,10 +46,6 @@ See: *Why are mounted MySQL data directories separated by version?*
|
|||||||
|
|
||||||
Uid and Gid are set to 1000 by default. You can alter them to match the uid/gid of your current user. Open the `.env` file and change the sections `NEW_UID` and `NEW_GID`. When you start up the devilbox, the php-container will use these values for its user.
|
Uid and Gid are set to 1000 by default. You can alter them to match the uid/gid of your current user. Open the `.env` file and change the sections `NEW_UID` and `NEW_GID`. When you start up the devilbox, the php-container will use these values for its user.
|
||||||
|
|
||||||
**Can I change the MySQL root password?**
|
|
||||||
|
|
||||||
Yes, you can change the password of the MySQL root user. If you do so, you must also set the new password in your `.env` file. See [Configure](Configure.md) for how to change the values.
|
|
||||||
|
|
||||||
**Can I not just comment out the service in the `.env` file?**
|
**Can I not just comment out the service in the `.env` file?**
|
||||||
|
|
||||||
No, don't do this. This will lead to unexpected behaviour (different versions will be loaded).
|
No, don't do this. This will lead to unexpected behaviour (different versions will be loaded).
|
||||||
@ -55,7 +59,7 @@ Yes. `http` and `php` will automatically always be started (due to dependencies
|
|||||||
|
|
||||||
The devilbox is a development stack, so it is made sure that a lot of PHP modules are available out of the box in order to work with many different frameworks.
|
The devilbox is a development stack, so it is made sure that a lot of PHP modules are available out of the box in order to work with many different frameworks.
|
||||||
|
|
||||||
*apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, intl, json, ldap, libxml, magickwand, mbstring, mcrypt, memcache, memcached, mhash, mongodb, msgpack, mysql, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, readline, recode, redis, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib*
|
> *apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, intl, json, ldap, libxml, magickwand, mbstring, mcrypt, memcache, memcached, mhash, mongodb, msgpack, mysql, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, readline, recode, redis, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib*
|
||||||
|
|
||||||
There will however be slight differences between the versions and especially with HHVM. To see the exact bundled modules for each version visit the corresponding docker repositories on Github:
|
There will however be slight differences between the versions and especially with HHVM. To see the exact bundled modules for each version visit the corresponding docker repositories on Github:
|
||||||
|
|
||||||
@ -67,9 +71,16 @@ There will however be slight differences between the versions and especially wit
|
|||||||
[PHP 7.2](https://github.com/cytopia/docker-php-fpm-7.2) |
|
[PHP 7.2](https://github.com/cytopia/docker-php-fpm-7.2) |
|
||||||
[HHVM](https://github.com/cytopia/docker-hhvm-latest)
|
[HHVM](https://github.com/cytopia/docker-hhvm-latest)
|
||||||
|
|
||||||
|
|
||||||
|
## 2. Configuration
|
||||||
|
|
||||||
|
**Can I change the MySQL root password?**
|
||||||
|
|
||||||
|
Yes, you can change the password of the MySQL root user. If you do so, you must also set the new password in your `.env` file. See **[Configure](Configure.md)** for how to change the values.
|
||||||
|
|
||||||
**Can I add other PHP Modules?**
|
**Can I add other PHP Modules?**
|
||||||
|
|
||||||
Yes, if there are any PHP modules you require that are not yet available in the PHP Docker container, you can install it during run-time, or create your own container. See [Hacking](Hacking.md) for more informatino.
|
Yes, if there are any PHP modules you require that are not yet available in the PHP Docker container, you can install it during run-time, or create your own container. See **[Hacking](Hacking.md)** for more information.
|
||||||
|
|
||||||
**Can I change php.ini?**
|
**Can I change php.ini?**
|
||||||
|
|
||||||
@ -81,4 +92,63 @@ Yes, my.cnf directives can be changes on a per MySQL version base. Go to `./cfg/
|
|||||||
|
|
||||||
**Can I switch HHVM between PHP 5.6 and PHP 7 mode?**
|
**Can I switch HHVM between PHP 5.6 and PHP 7 mode?**
|
||||||
|
|
||||||
Yes, this can be done by adding a \*.ini file to `./cfg/hhvm-latest/` with the following content: `hhvm.php7.all = 0` to disable PHP 7. The default is to use PHP 7 mode.
|
Yes, this can be done by adding a \*.ini file to `./cfg/hhvm-latest/` with the following content to disable PHP 7 mode:
|
||||||
|
|
||||||
|
```ini
|
||||||
|
hhvm.php7.all = 0
|
||||||
|
```
|
||||||
|
The default is to use PHP 7 mode.
|
||||||
|
|
||||||
|
**Can I change the project virtual host domain `.loc`?**
|
||||||
|
|
||||||
|
Yes, the `.env` variable `TLD_SUFFIX` can be adjusted with whatever domain or subdomain your require. A few examples to get you started:
|
||||||
|
|
||||||
|
| Project folder | TLD_SUFFIX | Project URL |
|
||||||
|
|----------------|------------|--------------------------|
|
||||||
|
| project1 | loc | http://project1.loc |
|
||||||
|
| project1 | local | http://project1.local |
|
||||||
|
| project1 | dev | http://project1.dev |
|
||||||
|
| project1 | work.loc | http://project1.work.loc |
|
||||||
|
|
||||||
|
**Can I just start PHP and MySQL instead of all container?**
|
||||||
|
|
||||||
|
Yes, every Docker container is optional. The devilbox allows for selective startup. See **[Run: selective start](Run.md#13-selective-start)** for more detail.
|
||||||
|
|
||||||
|
**Do I always have to edit `/etc/hosts` for new projects?**
|
||||||
|
|
||||||
|
You need a valid DNS entry for every project that points to the Httpd server. As those records don't exists by default, you will have to create them. However, the devilbox has a bundled DNS server that can automate this for you. The only thing you have to do for that to work is to add this DNS server's IP address to your `/etc/resolv.conf`. See **[Configure: AutoDNS](Configure.md#62-auto-dns)** for instructions.
|
||||||
|
|
||||||
|
## 3. Usage
|
||||||
|
|
||||||
|
**Does it work with CakePHP?**
|
||||||
|
|
||||||
|
Yes, see **[How to setup CakePHP](Examples.md#2-setup-cakephp)**.
|
||||||
|
|
||||||
|
**Does it work with Drupal?**
|
||||||
|
|
||||||
|
Yes, see **[How to setup Drupal](Examples.md#3-setup-drupal)**.
|
||||||
|
|
||||||
|
**Does it work with Laravel?**
|
||||||
|
|
||||||
|
Yes, see **[How to setup Laravel](Examples.md#4-setup-laravel)**.
|
||||||
|
|
||||||
|
**Does it work with PhalconPHP?**
|
||||||
|
|
||||||
|
Yes, see **[How to setup Phalcon](Examples.md#5-setup-phalcon)**.
|
||||||
|
|
||||||
|
**Does it work with Symfony?**
|
||||||
|
|
||||||
|
Yes, see **[How to setup Symfony](Examples.md#6-setup-symfony)**.
|
||||||
|
|
||||||
|
**Does it work with Wordpress?**
|
||||||
|
|
||||||
|
Yes, see **[How to setup Wordpress](Examples.md#7-setup-wordpress)**.
|
||||||
|
|
||||||
|
**Does it work with Yii?**
|
||||||
|
|
||||||
|
Yes, see **[How to setup Yii](Examples.md#8-setup-yii)**.
|
||||||
|
|
||||||
|
**Does it work with Zend Framework?**
|
||||||
|
|
||||||
|
Yes, see **[How to setup Zend](Examples.md#9-setup-zend)**.
|
||||||
|
|
||||||
|
@ -126,16 +126,16 @@ The heart of the devilbox is the easy configuration of an unlimitted numbder of
|
|||||||
**Assumption:**
|
**Assumption:**
|
||||||
|
|
||||||
1. HOST_PATH_TO_HTTPD_DATADIR=**./data/www**
|
1. HOST_PATH_TO_HTTPD_DATADIR=**./data/www**
|
||||||
2. TLD_SUFFIX=**local**
|
2. TLD_SUFFIX=**loc**
|
||||||
3. Three Projects: project1, project2 and wordpress
|
3. Three Projects: project1, project2 and wordpress
|
||||||
|
|
||||||
**Folder setup on your Host system:**
|
**Folder setup on your Host system:**
|
||||||
|
|
||||||
| VirtualHost directory | DocumentRoot directory | URL |
|
| VirtualHost directory | DocumentRoot directory | URL |
|
||||||
|-----------------------|-----------------------------|------------------------|
|
|-----------------------|-----------------------------|------------------------|
|
||||||
| <code>./data/www/<b>project1</b></code> | <code>./data/www/project1/<b>htdocs</b></code> | `http://project1.local` |
|
| <code>./data/www/<b>project1</b></code> | <code>./data/www/project1/<b>htdocs</b></code> | `http://project1.loc` |
|
||||||
| <code>./data/www/<b>project2</b></code> | <code>./data/www/project2/<b>htdocs</b></code> | `http://project2.local` |
|
| <code>./data/www/<b>project2</b></code> | <code>./data/www/project2/<b>htdocs</b></code> | `http://project2.loc` |
|
||||||
| <code>./data/www/<b>wordpress</b></code>| <code>./data/www/wordpress/<b>htdocs</b></code> | `http://wordpress.local` |
|
| <code>./data/www/<b>wordpress</b></code>| <code>./data/www/wordpress/<b>htdocs</b></code> | `http://wordpress.loc` |
|
||||||
|
|
||||||
Each VirtualHost will serve files from the **htdocs/** folder.
|
Each VirtualHost will serve files from the **htdocs/** folder.
|
||||||
|
|
||||||
@ -143,9 +143,9 @@ Each VirtualHost will serve files from the **htdocs/** folder.
|
|||||||
|
|
||||||
| Project folder | `/etc/hosts` entry |
|
| Project folder | `/etc/hosts` entry |
|
||||||
|----------------|----------------------------|
|
|----------------|----------------------------|
|
||||||
| project1 | `127.0.0.1 project1.local` |
|
| project1 | `127.0.0.1 project1.loc` |
|
||||||
| project2 | `127.0.0.1 project2.local` |
|
| project2 | `127.0.0.1 project2.loc` |
|
||||||
| wordpress | `127.0.0.1 wordpress.local`|
|
| wordpress | `127.0.0.1 wordpress.loc`|
|
||||||
|
|
||||||
Some frameworks have a nested www directory and require you to use a symlink instead of explicitly setting a **htdocs/** folder. See the CakePHP folder setup below:
|
Some frameworks have a nested www directory and require you to use a symlink instead of explicitly setting a **htdocs/** folder. See the CakePHP folder setup below:
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ The devilbox allows you to have an unlimitted number of projects ready without h
|
|||||||
|
|
||||||
The only thing you will have to do is to create a new folder on the filesystem and your virtual host is ready to be served with your custom domain.
|
The only thing you will have to do is to create a new folder on the filesystem and your virtual host is ready to be served with your custom domain.
|
||||||
|
|
||||||
The default project catch-all domain is `*.dev` (see [Configure](Configure.md) for how to change it). Let's view an example:
|
The default project catch-all domain is `*.loc` (see [Configure](Configure.md) for how to change it). Let's view an example:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# Inside your main project folder
|
# Inside your main project folder
|
||||||
@ -50,11 +50,11 @@ drwxr-xr-x 3 cytopia 4096 Jun 10 13:10 yii-test
|
|||||||
|
|
||||||
By having the above folders, the devilbox will automatically be able to serve the following vhosts:
|
By having the above folders, the devilbox will automatically be able to serve the following vhosts:
|
||||||
|
|
||||||
* http://my-drupal.dev
|
* http://my-drupal.loc
|
||||||
* http://my-wordpress.dev
|
* http://my-wordpress.loc
|
||||||
* http://project1.dev
|
* http://project1.loc
|
||||||
* http://project2.dev
|
* http://project2.loc
|
||||||
* http://yii-test.dev
|
* http://yii-test.loc
|
||||||
|
|
||||||
New folders can be created, deleted and removed during run-time and corresponding virtual hosts will be available instantly without having to restart anything.
|
New folders can be created, deleted and removed during run-time and corresponding virtual hosts will be available instantly without having to restart anything.
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ If you think additional tools should always be bundled, [create an issue](https:
|
|||||||
|
|
||||||
Your projects will be available by the same URL as they are available from your docker host computer. There is no need to edit the PHP container's `/etc/hosts` file, as it is automatically provide via the DNS container `bind`.
|
Your projects will be available by the same URL as they are available from your docker host computer. There is no need to edit the PHP container's `/etc/hosts` file, as it is automatically provide via the DNS container `bind`.
|
||||||
|
|
||||||
For example, by doing `curl http://project1.dev` from either your host computer or from inside the PHP container will return the same URL.
|
For example, by doing `curl http://project1.loc` from either your host computer or from inside the PHP container will return the same URL.
|
||||||
|
|
||||||
|
|
||||||
## 4. Managing Projects explained
|
## 4. Managing Projects explained
|
||||||
@ -192,13 +192,13 @@ Your project folder is determined by the value of `HOST_PATH_TO_HTTPD_DATADIR` w
|
|||||||
In order to make the following examples easier let's work with some assumed default values. The first one represents the project base directory and the second one is for the project domains.
|
In order to make the following examples easier let's work with some assumed default values. The first one represents the project base directory and the second one is for the project domains.
|
||||||
|
|
||||||
1. HOST_PATH_TO_HTTPD_DATADIR=**./data/www**
|
1. HOST_PATH_TO_HTTPD_DATADIR=**./data/www**
|
||||||
2. TLD_SUFFIX=**local**
|
2. TLD_SUFFIX=**loc**
|
||||||
|
|
||||||
| VirtualHost directory | DocumentRoot directory | URL |
|
| VirtualHost directory | DocumentRoot directory | URL |
|
||||||
|-----------------------|-----------------------------|------------------------|
|
|-----------------------|-----------------------------|------------------------|
|
||||||
| <code>./data/www/<b>project1</b></code> | <code>./data/www/project1/<b>htdocs</b></code> | `http://project1.local` |
|
| <code>./data/www/<b>project1</b></code> | <code>./data/www/project1/<b>htdocs</b></code> | `http://project1.loc` |
|
||||||
| <code>./data/www/<b>project2</b></code> | <code>./data/www/project2/<b>htdocs</b></code> | `http://project2.local` |
|
| <code>./data/www/<b>project2</b></code> | <code>./data/www/project2/<b>htdocs</b></code> | `http://project2.loc` |
|
||||||
| <code>./data/www/<b>wordpress</b></code>| <code>./data/www/wordpress/<b>htdocs</b></code> | `http://wordpress.local` |
|
| <code>./data/www/<b>wordpress</b></code>| <code>./data/www/wordpress/<b>htdocs</b></code> | `http://wordpress.loc` |
|
||||||
|
|
||||||
The VirtualHost directory make a new VirtualHost available under the specified URL. However the actual files that will be served are always expected to be in a subfolder called `htdocs/`. By having an additional sub-directory for the Document root you are able to store non-www files inside the project folder and even **symlink** you www dir to htdocs.
|
The VirtualHost directory make a new VirtualHost available under the specified URL. However the actual files that will be served are always expected to be in a subfolder called `htdocs/`. By having an additional sub-directory for the Document root you are able to store non-www files inside the project folder and even **symlink** you www dir to htdocs.
|
||||||
|
|
||||||
@ -209,7 +209,7 @@ This is a general overview about creating projects. If you want to see some real
|
|||||||
|
|
||||||
#### 5.1 From Docker host
|
#### 5.1 From Docker host
|
||||||
|
|
||||||
The following will create a VirtualHost for `http://project1.local`.
|
The following will create a VirtualHost for `http://project1.loc`.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# replace HOST_PATH_TO_HTTPD_DATADIR with the actual project base dir
|
# replace HOST_PATH_TO_HTTPD_DATADIR with the actual project base dir
|
||||||
@ -218,11 +218,11 @@ $ mkdir project1
|
|||||||
$ mkdir project1/htdocs
|
$ mkdir project1/htdocs
|
||||||
```
|
```
|
||||||
|
|
||||||
<sub>If you want to know how to change the TLD_SUFFIX `local` to something else, refer to [Configure](Configure.md).</sub>
|
<sub>If you want to know how to change the TLD_SUFFIX `loc` to something else, refer to [Configure](Configure.md).</sub>
|
||||||
|
|
||||||
#### 5.2 From inside the PHP container
|
#### 5.2 From inside the PHP container
|
||||||
|
|
||||||
If you prefer to work directly inside the PHP Docker container, you can do the same. The following will create a VirtualHost for `http://project1.local`.
|
If you prefer to work directly inside the PHP Docker container, you can do the same. The following will create a VirtualHost for `http://project1.loc`.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ cd /shared/httpd
|
$ cd /shared/httpd
|
||||||
@ -256,13 +256,13 @@ In order to actually visit the newly created project in your browser, there must
|
|||||||
|
|
||||||
##### 5.4.1 /etc/hosts
|
##### 5.4.1 /etc/hosts
|
||||||
|
|
||||||
If you have not setup Auto-DNS, you will need to create your own DNS records for every project. Let's assume your `TLD_SUFFIX` is set to `local`.
|
If you have not setup Auto-DNS, you will need to create your own DNS records for every project. Let's assume your `TLD_SUFFIX` is set to `loc`.
|
||||||
|
|
||||||
| Project folder | `/etc/hosts` entry |
|
| Project folder | `/etc/hosts` entry |
|
||||||
|----------------|-------------------------------|
|
|----------------|-------------------------------|
|
||||||
| my-project1 | `127.0.0.1 my-project1.local` |
|
| my-project1 | `127.0.0.1 my-project1.loc` |
|
||||||
| drupal-test | `127.0.0.1 drupal-test.local` |
|
| drupal-test | `127.0.0.1 drupal-test.loc` |
|
||||||
| playground | `127.0.0.1 playground.local` |
|
| playground | `127.0.0.1 playground.loc` |
|
||||||
|
|
||||||
##### 5.4.2 Auto-DNS
|
##### 5.4.2 Auto-DNS
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user