Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webroot config for Apache and Nginx with the {{root}} variable included #474

Open
wants to merge 1 commit into
base: docs
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions bedrock/bedrock-with-local.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,21 @@ server {
- root "{{root}}";
+ root "/Users/username/Local Sites/bedrock/app/bedrock/web";
```
Or you can do this instead
```diff
- root "{{root}}";
+ root "{{root}}/web";
```

This how it should look like in the file ( Apache config - file is located at `~/Local Sites/bedrock/conf/apache/site.conf.hbs`)
Copy link
Member

@swalkinshaw swalkinshaw Jul 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This how it should look like in the file ( Apache config - file is located at `~/Local Sites/bedrock/conf/apache/site.conf.hbs`)
This what it should look like in the file (Apache config - file is located at `~/Local Sites/bedrock/conf/apache/site.conf.hbs`)


```hbs
<VirtualHost *:{{port}}>
ServerAdmin webmaster@localhost
DocumentRoot "{{root}}/web"
[...]
Comment on lines +90 to +92
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ServerAdmin webmaster@localhost
DocumentRoot "{{root}}/web"
[...]
ServerAdmin webmaster@localhost
DocumentRoot "{{root}}/web"
[...]

</VirtualHost>
```
In the example above, the full path is based on a macOS machine and requires the username to be changed to the one you are using. You will need to modify this path for Windows and Linux setups to reflect the full path to the `app/bedrock/web` directory.

You will need to restart your site after making these changes, and then your site will be accessible at `https://bedrock.local`.