Skip to content

Commit

Permalink
update apache example with proper start command for jetify cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
LucilleH committed Jul 23, 2024
1 parent ce17002 commit fceec5b
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 39 deletions.
10 changes: 5 additions & 5 deletions docs/app/docs/devbox_examples/servers/apache.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ Use `devbox services start|stop apache` to start and stop httpd in the backgroun
### Helper Files
The following helper files will be created in your project directory:

* \{PROJECT_DIR\}/devbox.d/apache/httpd.conf
* \{PROJECT_DIR\}/devbox.d/apacheHttpd/httpd.conf
* \{PROJECT_DIR\}/devbox.d/web/index.html

Note that by default, Apache is configured with `./devbox.d/web` as the DocumentRoot. To change this, you should copy and modify the default `./devbox.d/apache/httpd.conf`.
Note that by default, Apache is configured with `./devbox.d/web` as the DocumentRoot. To change this, you should copy and modify the default `./devbox.d/apacheHttpd/httpd.conf`.

### Environment Variables
```bash
HTTPD_ACCESS_LOG_FILE={PROJECT_DIR}/.devbox/virtenv/apache/access.log
HTTPD_ERROR_LOG_FILE={PROJECT_DIR}/.devbox/virtenv/apache/error.log
HTTPD_ACCESS_LOG_FILE={PROJECT_DIR}/.devbox/virtenv/apacheHttpd/access.log
HTTPD_ERROR_LOG_FILE={PROJECT_DIR}/.devbox/virtenv/apacheHttpd/error.log
HTTPD_PORT=8080
HTTPD_DEVBOX_CONFIG_DIR={PROJECT_DIR}
HTTPD_CONFDIR={PROJECT_DIR}/devbox.d/apache
HTTPD_CONFDIR={PROJECT_DIR}/devbox.d/apacheHttpd
```

### Notes
Expand Down
4 changes: 2 additions & 2 deletions examples/development/php/latest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ For example -- to add the `ds` extension, run `devbox add php81Extensions.ds`, o

## PHP Plugin Details

The PHP Plugin will provide the following configuration when you install a PHP runtime with `devbox add`. You can also manually add the PHP plugin by adding `plugin:php` to your `includes` list in `devbox.json`:
The PHP Plugin will provide the following configuration when you install a PHP runtime with `devbox add`. You can also manually add the PHP plugin by adding `plugin:php` to your `include` list in `devbox.json`:

```json
"includes": [
"include": [
"plugin:php"
]
```
Expand Down
2 changes: 2 additions & 0 deletions examples/servers/apache/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
devbox.d/apacheHttpd/apache.pid
.devbox
6 changes: 3 additions & 3 deletions examples/servers/apache/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ Use `devbox services start|stop apache` to start and stop httpd in the backgroun

The following helper files will be created in your project directory:

* {PROJECT_DIR}/devbox.d/apache/httpd.conf
* {PROJECT_DIR}/devbox.d/apacheHttpd/httpd.conf
* {PROJECT_DIR}/devbox.d/web/index.html

Note that by default, Apache is configured with `./devbox.d/web` as the DocumentRoot. To change this, you should copy and modify the default `./devbox.d/apache/httpd.conf`.
Note that by default, Apache is configured with `./devbox.d/web` as the DocumentRoot. To change this, you should copy and modify the default `./devbox.d/apacheHttpd/httpd.conf`.

### Environment Variables

Expand All @@ -44,7 +44,7 @@ HTTPD_ACCESS_LOG_FILE={PROJECT_DIR}/.devbox/virtenv/apache/access.log
HTTPD_ERROR_LOG_FILE={PROJECT_DIR}/.devbox/virtenv/apache/error.log
HTTPD_PORT=8080
HTTPD_DEVBOX_CONFIG_DIR={PROJECT_DIR}
HTTPD_CONFDIR={PROJECT_DIR}/devbox.d/apache
HTTPD_CONFDIR={PROJECT_DIR}/devbox.d/apacheHttpd
```

### Notes
Expand Down
12 changes: 8 additions & 4 deletions examples/servers/apache/devbox.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"packages": [
"apacheHttpd@latest"
],
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.12.0/.schema/devbox.schema.json",
"packages": ["apacheHttpd@2.4.58"],
"shell": {
"init_hook": []
"init_hook": [
"echo 'Welcome to devbox!' > /dev/null"
],
"scripts": {
"start": "apachectl start -f $HTTPD_CONFDIR/httpd.conf -D FOREGROUND"
}
}
}
50 changes: 25 additions & 25 deletions examples/servers/apache/devbox.lock
Original file line number Diff line number Diff line change
@@ -1,104 +1,104 @@
{
"lockfile_version": "1",
"packages": {
"apacheHttpd@latest": {
"last_modified": "2024-02-22T01:07:56Z",
"apacheHttpd@2.4.58": {
"last_modified": "2024-04-03T07:31:48Z",
"plugin_version": "0.0.2",
"resolved": "github:NixOS/nixpkgs/98b00b6947a9214381112bdb6f89c25498db4959#apacheHttpd",
"resolved": "github:NixOS/nixpkgs/d03a4482228d4d6dbd2d4b425b6dfcd49ebe765f#apacheHttpd",
"source": "devbox-search",
"version": "2.4.58",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/vgjxjc4sa4zx9b42d91d8r27xbha6klz-apache-httpd-2.4.58",
"path": "/nix/store/qfh8f4l6cadv117hfh9xyia4miih4wpy-apache-httpd-2.4.58",
"default": true
},
{
"name": "man",
"path": "/nix/store/a12rmwciw8iqvbngxmxdwn6mnw6iylsw-apache-httpd-2.4.58-man",
"path": "/nix/store/dxx8z8nvjbgh2chqq3qlrc52n0w9nlwf-apache-httpd-2.4.58-man",
"default": true
},
{
"name": "doc",
"path": "/nix/store/n6c869qj61j5xyi6myr9fpz1b4i6sfrw-apache-httpd-2.4.58-doc"
"name": "dev",
"path": "/nix/store/pvr18halwxvrv4a3d7ymyjadqjnk3d1d-apache-httpd-2.4.58-dev"
},
{
"name": "dev",
"path": "/nix/store/ndi0n9ibvz5nydnglc4k5s3hj0p7r0xj-apache-httpd-2.4.58-dev"
"name": "doc",
"path": "/nix/store/3xsvcdh7w1x59pymkpzmihbvsm65gpm7-apache-httpd-2.4.58-doc"
}
],
"store_path": "/nix/store/vgjxjc4sa4zx9b42d91d8r27xbha6klz-apache-httpd-2.4.58"
"store_path": "/nix/store/qfh8f4l6cadv117hfh9xyia4miih4wpy-apache-httpd-2.4.58"
},
"aarch64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/1cvsir9an00px9kgxnydmid6629zs2dp-apache-httpd-2.4.58",
"path": "/nix/store/wy3lzv5h5k3smcgpac6bwls31dhl99ki-apache-httpd-2.4.58",
"default": true
},
{
"name": "man",
"path": "/nix/store/cifz6zrap0hsvc55p1qhs0mydl3ggc04-apache-httpd-2.4.58-man",
"path": "/nix/store/znwzwmsrsjcdrr6psyn8innsd9nwzj7m-apache-httpd-2.4.58-man",
"default": true
},
{
"name": "dev",
"path": "/nix/store/knp8xd49ms2i7a96jbinh7b1f2ljsi33-apache-httpd-2.4.58-dev"
"path": "/nix/store/0h5gpxw5sxwpgz946vlb22pkax7a7sf6-apache-httpd-2.4.58-dev"
},
{
"name": "doc",
"path": "/nix/store/mal95nqarl7h3pzhfsglww85j7y1xjrj-apache-httpd-2.4.58-doc"
"path": "/nix/store/5vf79ccpqxqnrw27ncyffzh3rcw12f8z-apache-httpd-2.4.58-doc"
}
],
"store_path": "/nix/store/1cvsir9an00px9kgxnydmid6629zs2dp-apache-httpd-2.4.58"
"store_path": "/nix/store/wy3lzv5h5k3smcgpac6bwls31dhl99ki-apache-httpd-2.4.58"
},
"x86_64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/kcx3v0kyafvrc80868s3pg1gdwxh8ld5-apache-httpd-2.4.58",
"path": "/nix/store/nldsf6h7y4m4vfm26ank7kjvs05g88gc-apache-httpd-2.4.58",
"default": true
},
{
"name": "man",
"path": "/nix/store/c30k9g6qaxsw5zmvjrj1ll45d3ln4bqm-apache-httpd-2.4.58-man",
"path": "/nix/store/i59k98mj24c35yyimpnimy13b9as05dd-apache-httpd-2.4.58-man",
"default": true
},
{
"name": "dev",
"path": "/nix/store/87j16x1ywvclpdaidw038szfd1p0040c-apache-httpd-2.4.58-dev"
"path": "/nix/store/4z8i6wwrf3yisklr368l0rcrpr6h3319-apache-httpd-2.4.58-dev"
},
{
"name": "doc",
"path": "/nix/store/3h7jbvd5r96ybyhdg5zj9adfbn7mmbwd-apache-httpd-2.4.58-doc"
"path": "/nix/store/p9y79pah2crpqq42y24q7ns744bjpphm-apache-httpd-2.4.58-doc"
}
],
"store_path": "/nix/store/kcx3v0kyafvrc80868s3pg1gdwxh8ld5-apache-httpd-2.4.58"
"store_path": "/nix/store/nldsf6h7y4m4vfm26ank7kjvs05g88gc-apache-httpd-2.4.58"
},
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/w2c092pbslx3f764slyl7ggi513524zb-apache-httpd-2.4.58",
"path": "/nix/store/85a038nhh046pf85za9ygwrgnxyxm9xl-apache-httpd-2.4.58",
"default": true
},
{
"name": "man",
"path": "/nix/store/h4snrpka9jy8zasd4qh1qgy7m65gv0pc-apache-httpd-2.4.58-man",
"path": "/nix/store/ns7lx2bqkb6wy1ikv2sa64db8xialrk9-apache-httpd-2.4.58-man",
"default": true
},
{
"name": "dev",
"path": "/nix/store/8kj6ks3y802pvz44lpzzw649hjdibd3c-apache-httpd-2.4.58-dev"
"path": "/nix/store/rmpym29gg5wdy3pxbkimjjlcgpdfsq25-apache-httpd-2.4.58-dev"
},
{
"name": "doc",
"path": "/nix/store/14px4n84brh7gh1xmj1g4wfls94znwm9-apache-httpd-2.4.58-doc"
"path": "/nix/store/c6yfg14y2hmya6qd2y31fdk7iyg2fh48-apache-httpd-2.4.58-doc"
}
],
"store_path": "/nix/store/w2c092pbslx3f764slyl7ggi513524zb-apache-httpd-2.4.58"
"store_path": "/nix/store/85a038nhh046pf85za9ygwrgnxyxm9xl-apache-httpd-2.4.58"
}
}
}
Expand Down

0 comments on commit fceec5b

Please sign in to comment.