Skip to content

Commit 005c298

Browse files
authored
Update docs / Create index for /docs/ (hestiacp#3740)
* Update docs * Add index for docs * Add CLI * Update CLI reference inline with 1.8.0 * .md does require an empty line * Fix broken example * Update CLI * Select checkbox when user enter hostname, email or password
1 parent 505db53 commit 005c298

File tree

6 files changed

+170
-31
lines changed

6 files changed

+170
-31
lines changed

bin/v-add-letsencrypt-domain

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
# options: USER DOMAIN [ALIASES] [MAIL]
44
#
55
# example: v-add-letsencrypt-domain admin wonderland.com www.wonderland.com,demo.wonderland.com
6-
#
7-
# For mail domains
8-
#
96
# example: v-add-letsencrypt-domain admin wonderland.com '' yes
107
#
118
# This function check and validates domain with Let's Encrypt

bin/v-rebuild-all

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# options: USER [RESTART]
44
#
55
# This function rebuilds all assets for a user account:
6+
#
67
# - Web domains
78
# - DNS zones
89
# - Mail domains

docs/.vitepress/theme/components/InstallOptions.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ export default {
5050
(this.$refs.dialog as HTMLDialogElement).close();
5151
}
5252
},
53+
checkNeedEnabled(e) {
54+
if (e.target.value != "") {
55+
let id = e.target.getAttribute("target");
56+
if (!document.getElementById(id).checked) {
57+
document.getElementById(id).click();
58+
}
59+
}
60+
},
5361
toggleOption(e) {
5462
if (e.target.checked) {
5563
let conflicts = e.target.getAttribute("conflicts");
@@ -108,9 +116,11 @@ export default {
108116
</template>
109117
<div v-if="item.textField">
110118
<input
119+
@change="checkNeedEnabled"
111120
type="text"
112121
class="form-control"
113122
v-model="item.text"
123+
:target="item.id"
114124
:id="'input-' + item.id"
115125
:type="'+item.type+'"
116126
/>

docs/docs/index.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Documentation
2+
3+
## Getting started
4+
5+
- [Getting started](/docs/introduction/getting-started.md)
6+
- [Best practices](/docs/introduction/best-practices.md)
7+
8+
## User Guide
9+
10+
- [Account](/docs/user-guide/account.md)
11+
- [Backups](/docs/user-guide/backups.md)
12+
- [Cron jobs](/docs/user-guide/cron-jobs.md)
13+
- [Databases](/docs/user-guide/databases.md)
14+
- [DNS](/docs/user-guide/dns.md)
15+
- [File manager](/docs/user-guide/file-manager.md)
16+
- [Mail domains](/docs/user-guide/mail-domains.md)
17+
- [Notifications](/docs/user-guide/notifications.md)
18+
- [Packages](/docs/user-guide/packages.md)
19+
- [Statistics](/docs/user-guide/statistics.md)
20+
- [Users](/docs/user-guide/users.md)
21+
- [Web domains](/docs/user-guide/web-domains.md)
22+
23+
## Server administration
24+
25+
- [Backup & restore](/docs/server-administration/backup-restore.md)
26+
- [Configuration](/docs/server-administration/configuration.md)
27+
- [Customisation](/docs/server-administration/customisation.md)
28+
- [Databases & phpMyAdmin](/docs/server-administration/databases.md)
29+
- [DNS clusters & DNSSEC](/docs/server-administration/dns.md)
30+
- [Email](/docs/server-administration/email.md)
31+
- [File manager](/docs/server-administration/file-manager.md)
32+
- [Firewall](/docs/server-administration/firewall.md)
33+
- [OS upgrades](/docs/server-administration/os-upgrades.md)
34+
- [Rest API](/docs/server-administration/rest-api.md)
35+
- [SSL certificates](/docs/server-administration/ssl-certificates.md)
36+
- [Web templates & caching](/docs/server-administration/web-templates.md)
37+
- [Troubleshooting](/docs/server-administration/troubleshooting.md)
38+
39+
## Contributing
40+
41+
- [Building Packages](/docs/contributing/building.md)
42+
- [Development](/docs/contributing/development.md)
43+
- [Documentation](/docs/contributing/documentation.md)
44+
- [Quick install app](/docs/contributing/quick-install-app.md)
45+
- [Testing](/docs/contributing/testing.md)
46+
- [Translations](/docs/contributing/translations.md)
47+
48+
## Community
49+
50+
- [Hestia Nginx Cache](/docs/community/hestia-nginx-cache.md)
51+
- [Ioncube installer for Hestia](/docs/community/ioncube-hestia-installer.md)
52+
- [Install script generator](/docs/community/install-script-generator.md)
53+
54+
## Reference
55+
56+
- [API](/docs/reference/api.md)
57+
- [CLI](/docs/reference/cli.md)

docs/docs/reference/cli.md

Lines changed: 34 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,6 @@ add webmail support for a domain
552552
```bash
553553
v-add-sys-webmail user domain.com
554554
example: v-add-sys-webmail user domain.com snappymail
555-
example: v-add-sys-webmail user domain.com rainloop
556555
example: v-add-sys-webmail user domain.com roundcube
557556
```
558557

@@ -675,22 +674,6 @@ add system quota
675674
This function enables filesystem quota on /home partition
676675
Some kernels do require additional packages to be installed first
677676

678-
## v-add-sys-rainloop
679-
680-
Install Rainloop webmail client
681-
682-
**Options**: `[MODE]`
683-
684-
This function installs the Rainloop webmail client.
685-
686-
## v-add-sys-snappymail
687-
688-
Install SnappyMail webmail client
689-
690-
**Options**: `[MODE]`
691-
692-
This function installs the SnappyMail webmail client.
693-
694677
## v-add-sys-roundcube
695678

696679
Install Roundcube webmail client
@@ -742,6 +725,14 @@ v-add-sys-smtp-relay srv.smtprelay.tld uname123 pass12345
742725

743726
This function adds system wide smtp relay support.
744727

728+
## v-add-sys-snappymail
729+
730+
Install SnappyMail webmail client
731+
732+
**Options**: `[MODE]`
733+
734+
This function installs the SnappyMail webmail client.
735+
745736
## v-add-user
746737

747738
add system user
@@ -866,7 +857,7 @@ v-add-web-domain admin wonderland.com 192.18.22.43 yes www.wonderland.com
866857

867858
This function adds virtual host to a server. In cases when ip is
868859
undefined in the script, "default" template will be used. The alias of
869-
<www.domain.tld> type will be automatically assigned to the domain unless
860+
`www.domain.tld` type will be automatically assigned to the domain unless
870861
"none" is transmited as argument. If ip have associated dns name, this
871862
domain will also get the alias domain-tpl.$ipname. An alias with the ip
872863
name is useful during the site testing while dns isn't moved to server yet.
@@ -3293,6 +3284,21 @@ v-download-backup admin admin.2020-11-05_05-10-21.tar
32933284

32943285
This function download back-up from remote server
32953286

3287+
## v-dump-database
3288+
3289+
Dumps database contents in STDIN / file
3290+
3291+
**Options**: `USER` `DATABASE` `[FILE]`
3292+
3293+
**Examples**:
3294+
3295+
```bash
3296+
v-dump-database user user_databse > test.sql
3297+
example: v-dump-database user user_databse file
3298+
```
3299+
3300+
Dumps database in STDIN or /backup/user.database.type.sql
3301+
32963302
## v-export-rrd
32973303

32983304
export rrd charts as json
@@ -3343,7 +3349,7 @@ generate password hash
33433349
**Examples**:
33443350

33453351
```php
3346-
v-generate-password-hash sha-512 rAnDom_string yourPassWord
3352+
v-generate-password-hash sha-512 rAnDom_string yourPassWord
33473353
```
33483354

33493355
This function generates password hash
@@ -4641,13 +4647,6 @@ rebuild all assets for a specified user
46414647

46424648
This function rebuilds all assets for a user account:
46434649

4644-
- Web domains
4645-
- DNS zones
4646-
- Mail domains
4647-
- Databases
4648-
- Cron Jobs
4649-
- User account configuration
4650-
46514650
## v-rebuild-cron-jobs
46524651

46534652
rebuild cron jobs
@@ -5870,7 +5869,7 @@ This function of updating all hestia packages
58705869

58715870
Install update from Git repository
58725871

5873-
**Options**: `REPOSITORY` `BRANCH` `INSTALL` `[PACKAGES]`
5872+
**Options**: `REPOSITORY` `BRANCH` `INSTALL`
58745873

58755874
**Examples**:
58765875

@@ -6210,3 +6209,11 @@ update web templates
62106209
**Options**: `[RESTART]` `[SKIP]`
62116210

62126211
This function for obtaining updated web (Nginx/Apache2/PHP) templates from the Hestia package.
6212+
6213+
## v-update-white-label-logo
6214+
6215+
update white label logo's
6216+
6217+
**Options**: `[DOWNLOAD]`
6218+
6219+
Replace Hestia logos with User created logo's

docs/docs/server-administration/troubleshooting.md

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The error message states (98) Address already in use: AG0072: make_sock: could n
3535

3636
When a package update sometimes comes with a new config and probally it has been overwritten...
3737

38-
```batch
38+
```bash
3939
Configuration file '/etc/apache2/apache2.conf'
4040
==> Modified (by you or by a script) since installation.
4141
==> Package distributor has shipped an updated version.
@@ -55,3 +55,70 @@ How ever if you entered Y or I. Then replace the config that can be found in /ro
5555
xxxxxx is the date/time the backup is made during the last update of HestiaCP
5656
5757
If you don't have have a backup made you can also copy the config in /usr/local/hestia/install/deb/apache2/apache2.conf to /etc/apache2.conf and also empty /etc/apache2/ports.conf
58+
59+
## Unable to bind adress
60+
61+
In rare cases the network service might be slower than Apache2 and or Nginx. In that case Nginx or Apache2 will refuse to start up successfully start.
62+
63+
```bash
64+
systemctl status nginx
65+
```
66+
67+
Will create the error an error
68+
69+
```bash
70+
nginx: [emerg] bind to x.x.x.x:80 failed (99: cannot assign requested address)
71+
```
72+
73+
or in case of Aapche2
74+
75+
```bash
76+
(99)Cannot assign requested address: AH00072: make_sock: could not bind to address x.x.x.x:8443
77+
```
78+
79+
The following command should allow services to assign to non existing ip addresses
80+
81+
```bash
82+
sysctl -w net.ipv4.ip_nonlocal_bind=1
83+
```
84+
85+
## Error: 24: Too many open files
86+
87+
```bash
88+
2022/02/21 15:04:38 [emerg] 51772#51772: open() "/var/log/apache2/domains/<redactedforprivacy>.error.log" failed (24: Too many open files)
89+
```
90+
91+
or
92+
93+
```bash
94+
2022/02/21 15:04:38 [emerg] 2724394#2724394: open() "/var/log/nginx/domains/xxx.error.log" failed (24: Too many open files)
95+
```
96+
97+
This error means that there are to many open files with Nginx. To resolve this issue:
98+
99+
/etc/systemd/system/nginx.service.d/override.conf
100+
101+
```bash
102+
[Service]
103+
LimitNOFILE=65536
104+
```
105+
106+
Then run:
107+
108+
```bash
109+
systemctl daemon-reload
110+
```
111+
112+
Add this to the Nginx config file (Needs to be smaller or equal to LimitNOFILE!)
113+
114+
```bash
115+
worker_rlimit_nofile 16384
116+
```
117+
118+
And then restart nginx with systemctl restart nginx
119+
120+
To verifiy run:
121+
122+
```bash
123+
cat /proc/ < nginx-pid > /limits
124+
```

0 commit comments

Comments
 (0)