Skip to content

Commit 03c75f3

Browse files
authored
Merge pull request #4 from devilbox/WAT-004
WAT-004 Show how to mass vhost
2 parents 3e69875 + 31f7567 commit 03c75f3

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,16 @@ You can specify the placeholders as many times as you want. See the following ex
2121

2222
### Examples
2323

24-
Assuming [vhost_add.py](https://github.com/devilbox/vhost-gen) will add nginx vhost config files, the following will then be able to create new nginx vhosts on-the-fly, simply by adding or deleting folders in your main www directory. The trigger command will simply force nginx to reload its configuration after directory changes occured.
24+
By using [vhost_gen.py](https://github.com/devilbox/vhost-gen) (which will create nginx vhost config files), the following will be able to create new nginx vhosts on-the-fly, simply by adding or deleting folders in your main www directory. The trigger command will simply force nginx to reload its configuration after directory changes occured.
2525

2626
```shell
27-
watcherd -p /var/www -a "vhost_add.py -p %p -n %n" -d "rm %p" -t "nginx -s stop"
27+
# %n will be replaced by watcherd with the new directory name
28+
# %p will be replaced by watcherd with the new directory path
29+
watcherd -v \
30+
-p /shared/httpd \
31+
-a "vhost_gen.py -p %p -n %n -s" \
32+
-d "rm /etc/nginx/conf.d/%n.conf" \
33+
-t "nginx -s reload"
2834
```
2935

3036
### Usage

0 commit comments

Comments
 (0)