Skip to content

Commit aadf84b

Browse files
authored
Merge pull request RoverWire#32 from vinicius73/patch-1
minnor readme adjusts
2 parents e88778b + 441b794 commit aadf84b

File tree

1 file changed

+37
-19
lines changed

1 file changed

+37
-19
lines changed

README.md

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,56 +8,74 @@ Bash Script to allow create or delete apache/nginx virtual hosts on Ubuntu on a
88
1. Download the script
99
2. Apply permission to execute:
1010

11-
$ chmod +x /path/to/virtualhost.sh
11+
```
12+
$ chmod +x /path/to/virtualhost.sh
13+
```
1214

1315
3. Optional: if you want to use the script globally, then you need to copy the file to your /usr/local/bin directory, is better
1416
if you copy it without the .sh extension:
1517

16-
$ sudo cp /path/to/virtualhost.sh /usr/local/bin/virtualhost
18+
```bash
19+
$ sudo cp /path/to/virtualhost.sh /usr/local/bin/virtualhost
20+
```
1721

1822
### For Global Shortcut ###
1923

20-
$ cd /usr/local/bin
21-
$ wget -O virtualhost https://raw.githubusercontent.com/RoverWire/virtualhost/master/virtualhost.sh
22-
$ chmod +x virtualhost
23-
$ wget -O virtualhost-nginx https://raw.githubusercontent.com/RoverWire/virtualhost/master/virtualhost-nginx.sh
24-
$ chmod +x virtualhost-nginx
24+
```bash
25+
$ cd /usr/local/bin
26+
$ wget -O virtualhost https://raw.githubusercontent.com/RoverWire/virtualhost/master/virtualhost.sh
27+
$ chmod +x virtualhost
28+
$ wget -O virtualhost-nginx https://raw.githubusercontent.com/RoverWire/virtualhost/master/virtualhost-nginx.sh
29+
$ chmod +x virtualhost-nginx
30+
```
2531

2632
## Usage ##
2733

2834
Basic command line syntax:
2935

30-
$ sudo sh /path/to/virtualhost.sh [create | delete] [domain] [optional host_dir]
36+
```bash
37+
$ sudo sh /path/to/virtualhost.sh [create | delete] [domain] [optional host_dir]
38+
```
3139

3240
With script installed on /usr/local/bin
3341

34-
$ sudo virtualhost [create | delete] [domain] [optional host_dir]
35-
42+
```bash
43+
$ sudo virtualhost [create | delete] [domain] [optional host_dir]
44+
```
3645

3746
### Examples ###
3847

3948
to create a new virtual host:
4049

41-
$ sudo virtualhost create mysite.dev
42-
50+
```bash
51+
$ sudo virtualhost create mysite.dev
52+
```
4353
to create a new virtual host with custom directory name:
4454

45-
$ sudo virtualhost create anothersite.dev my_dir
46-
55+
```bash
56+
$ sudo virtualhost create anothersite.dev my_dir
57+
```
4758
to delete a virtual host
4859

49-
$ sudo virtualhost delete mysite.dev
60+
```bash
61+
$ sudo virtualhost delete mysite.dev
62+
```
5063

5164
to delete a virtual host with custom directory name:
5265

53-
$ sudo virtualhost delete anothersite.dev my_dir
54-
66+
```
67+
$ sudo virtualhost delete anothersite.dev my_dir
68+
```
5569
### Localization
5670

5771
For Apache:
5872

59-
$ sudo cp /path/to/locale/<language>/virtualhost.mo /usr/share/locale/<language>/LC_MESSAGES/
73+
```bash
74+
$ sudo cp /path/to/locale/<language>/virtualhost.mo /usr/share/locale/<language>/LC_MESSAGES/
75+
```
6076

6177
For NGINX:
6278

63-
$ sudo cp /path/to/locale/<language>/virtualhost-nginx.mo /usr/share/locale/<language>/LC_MESSAGES/
79+
```bash
80+
$ sudo cp /path/to/locale/<language>/virtualhost-nginx.mo /usr/share/locale/<language>/LC_MESSAGES/
81+
```

0 commit comments

Comments
 (0)