Skip to content

Commit d448730

Browse files
Merge pull request laradock#850 from winfried-van-loon/849-apache-webroot
Updating webroots to have the same defaults
2 parents fd47c89 + 080fffb commit d448730

11 files changed

Lines changed: 29 additions & 25 deletions

File tree

DOCUMENTATION/content/getting-started/index.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ git submodule add https://github.com/Laradock/laradock.git
4141

4242
Note: If you are not using Git yet for your project, you can use `git clone` instead of `git submodule `.
4343

44-
*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)*
44+
*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)*
4545

4646

4747
Your folder structure should look like this:
@@ -75,15 +75,19 @@ Your folder structure should look like this:
7575

7676
2 - Edit your web server sites configuration.
7777

78-
**NGINX Example:**
78+
We'll need to do step 1 of the [Usage](#Usage) section now to make this happen.
7979

80-
Open `nginx/sites/default.conf` and change the `root` from `/var/www/public` to `/var/www/{my-project-folder-name}/public`.
81-
82-
*Or you can keep `default.conf` as it is, and create a separate config `my-site.conf` file for it.*
80+
```
81+
cp env-example .env
82+
```
8383

84+
At the top, change the `APPLICATION` variable to your project path.
8485

85-
<br>
86+
```
87+
APPLICATION=../project-z/public/
88+
```
8689

90+
Make sure to replace `project-z` with your project folder name.
8791

8892
> **Now jump to the [Usage](#Usage) section.**
8993
@@ -145,7 +149,7 @@ If you are using **Docker Toolbox** (VM), do one of the following:
145149
146150
<br>
147151

148-
1 - Enter the laradock folder and rename `env-example` to `.env`
152+
1 - Enter the laradock folder and copy `env-example` to `.env`
149153

150154
```shell
151155
cp env-example .env

DOCUMENTATION/content/guides/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,14 @@ Remove 0.0.0.0:80
165165

166166
```
167167
0.0.0.0:80
168-
root /var/www/public
168+
root /var/www
169169
```
170170

171171
and replace with your https://yourdomain.com
172172

173173
```
174174
https://yourdomain.com
175-
root /var/www/public
175+
root /var/www
176176
```
177177

178178
uncomment tls

apache2/sites/sample.conf.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<VirtualHost *:80>
22
ServerName sample.dev
3-
DocumentRoot /var/www/sample/public/
3+
DocumentRoot /var/www/sample/
44
Options Indexes FollowSymLinks
55

6-
<Directory "/var/www/sample/public/">
6+
<Directory "/var/www/sample/">
77
AllowOverride All
88
<IfVersion < 2.4>
99
Allow from all

beanstalkd-console/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ RUN apt-get remove --purge -y curl && \
1414

1515
EXPOSE 2080
1616

17-
CMD bash -c 'BEANSTALK_SERVERS=$BEANSTALKD_PORT_11300_TCP_ADDR:11300 php -S 0.0.0.0:2080 -t /source/public'
17+
CMD bash -c 'BEANSTALK_SERVERS=$BEANSTALKD_PORT_11300_TCP_ADDR:11300 php -S 0.0.0.0:2080 -t /source'

caddy/Caddyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Docs: https://caddyserver.com/docs/caddyfile
22
0.0.0.0:80
3-
root /var/www/public
3+
root /var/www
44
fastcgi / php-fpm:9000 php {
55
index index.php
66
}

caddy/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ RUN curl --silent --show-error --fail --location \
1919

2020
EXPOSE 80 443 2015
2121

22-
WORKDIR /var/www/public
22+
WORKDIR /var/www
2323

2424
CMD ["/usr/bin/caddy", "-conf", "/etc/Caddyfile"]

env-example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
### Application Path
66
# Point to your application code, will be available at `/var/www`.
77

8-
APPLICATION=../
8+
APPLICATION=../public/
99

1010
### Data Path:
1111
# For all storage systems.

hhvm/server.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ hhvm.log.level = Error
1212
hhvm.log.header = true
1313
hhvm.log.access[default][file] = /var/log/hhvm/access.log
1414
hhvm.log.access[default][format] = "%h %l %u %t \"%r\" %>s %b"
15-
hhvm.server.source_root=/var/www/public
15+
hhvm.server.source_root=/var/www
1616
hhvm.repo.central.path = /var/run/hhvm/hhvm.hhbc
1717

1818
; Uncomment to log to files instead of STDOUT

nginx/sites/default.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ server {
44
listen [::]:80 default_server ipv6only=on;
55

66
server_name localhost;
7-
root /var/www/public;
7+
root /var/www;
88
index index.php index.html index.htm;
99

1010
location / {
@@ -15,7 +15,7 @@ server {
1515
try_files $uri /index.php =404;
1616
fastcgi_pass php-upstream;
1717
fastcgi_index index.php;
18-
fastcgi_buffers 16 16k;
18+
fastcgi_buffers 16 16k;
1919
fastcgi_buffer_size 32k;
2020
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
2121
include fastcgi_params;
@@ -24,7 +24,7 @@ server {
2424
location ~ /\.ht {
2525
deny all;
2626
}
27-
27+
2828
location /.well-known/acme-challenge/ {
2929
root /var/www/letsencrypt/;
3030
log_not_found off;

nginx/sites/project-1.conf.example

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ server {
44
listen [::]:80;
55

66
server_name project-1.dev;
7-
root /var/www/project-1/public;
7+
root /var/www/project-1;
88
index index.php index.html index.htm;
99

1010
location / {
@@ -15,7 +15,7 @@ server {
1515
try_files $uri /index.php =404;
1616
fastcgi_pass php-upstream;
1717
fastcgi_index index.php;
18-
fastcgi_buffers 16 16k;
18+
fastcgi_buffers 16 16k;
1919
fastcgi_buffer_size 32k;
2020
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
2121
include fastcgi_params;
@@ -24,7 +24,7 @@ server {
2424
location ~ /\.ht {
2525
deny all;
2626
}
27-
27+
2828
location /.well-known/acme-challenge/ {
2929
root /var/www/letsencrypt/;
3030
log_not_found off;

0 commit comments

Comments
 (0)