Merge pull request #850 from winfried-van-loon/849-apache-webroot

Updating webroots to have the same defaults
This commit is contained in:
Winfried 2017-04-30 18:46:57 +02:00 committed by GitHub
commit d44873085b
11 changed files with 29 additions and 25 deletions

View File

@ -41,7 +41,7 @@ git submodule add https://github.com/Laradock/laradock.git
Note: If you are not using Git yet for your project, you can use `git clone` instead of `git submodule `.
*To keep track of your Laradock changes, between your projects and also keep Laradock updated [check this docs](/documentation/#keep-track-of-your-laradock-changes)*
*To keep track of your Laradock changes, between your projects and also keep Laradock updated [check these docs](/documentation/#keep-track-of-your-laradock-changes)*
Your folder structure should look like this:
@ -75,15 +75,19 @@ Your folder structure should look like this:
2 - Edit your web server sites configuration.
**NGINX Example:**
We'll need to do step 1 of the [Usage](#Usage) section now to make this happen.
Open `nginx/sites/default.conf` and change the `root` from `/var/www/public` to `/var/www/{my-project-folder-name}/public`.
```
cp env-example .env
```
*Or you can keep `default.conf` as it is, and create a separate config `my-site.conf` file for it.*
At the top, change the `APPLICATION` variable to your project path.
```
APPLICATION=../project-z/public/
```
<br>
Make sure to replace `project-z` with your project folder name.
> **Now jump to the [Usage](#Usage) section.**
@ -145,7 +149,7 @@ If you are using **Docker Toolbox** (VM), do one of the following:
<br>
1 - Enter the laradock folder and rename `env-example` to `.env`
1 - Enter the laradock folder and copy `env-example` to `.env`
```shell
cp env-example .env

View File

@ -165,14 +165,14 @@ Remove 0.0.0.0:80
```
0.0.0.0:80
root /var/www/public
root /var/www
```
and replace with your https://yourdomain.com
```
https://yourdomain.com
root /var/www/public
root /var/www
```
uncomment tls

View File

@ -1,9 +1,9 @@
<VirtualHost *:80>
ServerName sample.dev
DocumentRoot /var/www/sample/public/
DocumentRoot /var/www/sample/
Options Indexes FollowSymLinks
<Directory "/var/www/sample/public/">
<Directory "/var/www/sample/">
AllowOverride All
<IfVersion < 2.4>
Allow from all

View File

@ -14,4 +14,4 @@ RUN apt-get remove --purge -y curl && \
EXPOSE 2080
CMD bash -c 'BEANSTALK_SERVERS=$BEANSTALKD_PORT_11300_TCP_ADDR:11300 php -S 0.0.0.0:2080 -t /source/public'
CMD bash -c 'BEANSTALK_SERVERS=$BEANSTALKD_PORT_11300_TCP_ADDR:11300 php -S 0.0.0.0:2080 -t /source'

View File

@ -1,6 +1,6 @@
# Docs: https://caddyserver.com/docs/caddyfile
0.0.0.0:80
root /var/www/public
root /var/www
fastcgi / php-fpm:9000 php {
index index.php
}

View File

@ -19,6 +19,6 @@ RUN curl --silent --show-error --fail --location \
EXPOSE 80 443 2015
WORKDIR /var/www/public
WORKDIR /var/www
CMD ["/usr/bin/caddy", "-conf", "/etc/Caddyfile"]

View File

@ -5,7 +5,7 @@
### Application Path
# Point to your application code, will be available at `/var/www`.
APPLICATION=../
APPLICATION=../public/
### Data Path:
# For all storage systems.

View File

@ -12,7 +12,7 @@ hhvm.log.level = Error
hhvm.log.header = true
hhvm.log.access[default][file] = /var/log/hhvm/access.log
hhvm.log.access[default][format] = "%h %l %u %t \"%r\" %>s %b"
hhvm.server.source_root=/var/www/public
hhvm.server.source_root=/var/www
hhvm.repo.central.path = /var/run/hhvm/hhvm.hhbc
; Uncomment to log to files instead of STDOUT

View File

@ -4,7 +4,7 @@ server {
listen [::]:80 default_server ipv6only=on;
server_name localhost;
root /var/www/public;
root /var/www;
index index.php index.html index.htm;
location / {

View File

@ -4,7 +4,7 @@ server {
listen [::]:80;
server_name project-1.dev;
root /var/www/project-1/public;
root /var/www/project-1;
index index.php index.html index.htm;
location / {

View File

@ -4,7 +4,7 @@ server {
listen [::]:80;
server_name project-2.dev;
root /var/www/project-2/public;
root /var/www/project-2;
index index.php index.html index.htm;
location / {