diff --git a/README.md b/README.md index 7af966f..cb3b87f 100644 --- a/README.md +++ b/README.md @@ -62,14 +62,14 @@ folders: #### Ubuntu -By default, DevBox uses Ubuntu 16.04. To use a different version, add the `ubuntu` property. Supported versions are `14.04` and `16.04`. +By default, DevBox uses Ubuntu 16.04. To use a different version, add the `ubuntu` property. Supported versions are `14.04` and `16.04`. ```yaml ubuntu: "14.04" ``` #### Webserver -By default, DevBox uses Nginx as the web server. To use a different web server, add the `webserver` property. Supported servers are `nginx` and `apache`. +By default, DevBox uses Nginx as the web server. To use a different web server, add the `webserver` property. Supported servers are `nginx` and `apache`. ```yaml webserver: apache ``` @@ -123,17 +123,17 @@ sites: ``` **Note**: PHP version 5.5 is also supported for legacy systems. Add `5` to the `php` sites property. -The url must be added to your machines `hosts` file. Example: +The url must be added to your machines `hosts` file. Example: ``` 192.168.22.18 site1.test 192.168.22.18 site2.test ``` -A self-signed SSL certificate is created for each site, so sites can be accessed via HTTP and HTTPS. +A self-signed SSL certificate is created for each site, so sites can be accessed via HTTP and HTTPS. #### MySQL -By default, DevBox uses MySQL 5.7. To install an alternative version, add the `mysql` property. Supported versions are `5.5`, `5.6` and `5.7`. +By default, DevBox uses MySQL 5.7. To install an alternative version, add the `mysql` property. Supported versions are `5.5`, `5.6` and `5.7`. ```yaml mysql: "5.5" ``` @@ -177,8 +177,5 @@ A number of default bash aliases are created for the VM. These can be found in t ### Other software included - Git -- NVM and Node with the following global packages: - - Bower - - Grunt - - Gulp -- Yarn \ No newline at end of file +- NVM and Node +- Yarn diff --git a/scripts/serve-apache b/scripts/serve-apache index cb9a220..945b583 100644 --- a/scripts/serve-apache +++ b/scripts/serve-apache @@ -64,6 +64,10 @@ block=" echo "$block" > "/etc/apache2/sites-available/$hostname.conf" +a2enmod proxy proxy_fcgi ssl > /dev/null 2>&1 + +a2dissite 000-default > /dev/null 2>&1 a2ensite "$hostname.conf" > /dev/null 2>&1 -a2enconf "php$php-fpm" && service apache2 restart \ No newline at end of file +a2enconf "php$php-fpm" > /dev/null 2>&1 +service apache2 restart > /dev/null 2>&1 diff --git a/scripts/serve-nginx b/scripts/serve-nginx index bb311c2..aeaee87 100644 --- a/scripts/serve-nginx +++ b/scripts/serve-nginx @@ -54,4 +54,9 @@ block="server { echo "$block" > "/etc/nginx/sites-available/$hostname" -ln -fs "/etc/nginx/sites-available/$hostname" "/etc/nginx/sites-enabled/$hostname" \ No newline at end of file +if [[ -f /etc/nginx/sites-enabled/default ]] +then + rm /etc/nginx/sites-enabled/default +fi + +ln -fs "/etc/nginx/sites-available/$hostname" "/etc/nginx/sites-enabled/$hostname"