Просмотр исходного кода

Update docs / Create index for /docs/ (#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
Jaap Marcus 2 лет назад
Родитель
Сommit
005c29871e

+ 0 - 3
bin/v-add-letsencrypt-domain

@@ -3,9 +3,6 @@
 # options: USER DOMAIN [ALIASES] [MAIL]
 # options: USER DOMAIN [ALIASES] [MAIL]
 #
 #
 # example: v-add-letsencrypt-domain admin wonderland.com www.wonderland.com,demo.wonderland.com
 # example: v-add-letsencrypt-domain admin wonderland.com www.wonderland.com,demo.wonderland.com
-#
-# For mail domains
-#
 # example: v-add-letsencrypt-domain admin wonderland.com '' yes
 # example: v-add-letsencrypt-domain admin wonderland.com '' yes
 #
 #
 # This function check and validates domain with Let's Encrypt
 # This function check and validates domain with Let's Encrypt

+ 1 - 0
bin/v-rebuild-all

@@ -3,6 +3,7 @@
 # options: USER [RESTART]
 # options: USER [RESTART]
 #
 #
 # This function rebuilds all assets for a user account:
 # This function rebuilds all assets for a user account:
+#
 # - Web domains
 # - Web domains
 # - DNS zones
 # - DNS zones
 # - Mail domains
 # - Mail domains

+ 10 - 0
docs/.vitepress/theme/components/InstallOptions.vue

@@ -50,6 +50,14 @@ export default {
 				(this.$refs.dialog as HTMLDialogElement).close();
 				(this.$refs.dialog as HTMLDialogElement).close();
 			}
 			}
 		},
 		},
+		checkNeedEnabled(e) {
+			if (e.target.value != "") {
+				let id = e.target.getAttribute("target");
+				if (!document.getElementById(id).checked) {
+					document.getElementById(id).click();
+				}
+			}
+		},
 		toggleOption(e) {
 		toggleOption(e) {
 			if (e.target.checked) {
 			if (e.target.checked) {
 				let conflicts = e.target.getAttribute("conflicts");
 				let conflicts = e.target.getAttribute("conflicts");
@@ -108,9 +116,11 @@ export default {
 				</template>
 				</template>
 				<div v-if="item.textField">
 				<div v-if="item.textField">
 					<input
 					<input
+						@change="checkNeedEnabled"
 						type="text"
 						type="text"
 						class="form-control"
 						class="form-control"
 						v-model="item.text"
 						v-model="item.text"
+						:target="item.id"
 						:id="'input-' + item.id"
 						:id="'input-' + item.id"
 						:type="'+item.type+'"
 						:type="'+item.type+'"
 					/>
 					/>

+ 57 - 0
docs/docs/index.md

@@ -0,0 +1,57 @@
+# Documentation
+
+## Getting started
+
+- [Getting started](/docs/introduction/getting-started.md)
+- [Best practices](/docs/introduction/best-practices.md)
+
+## User Guide
+
+- [Account](/docs/user-guide/account.md)
+- [Backups](/docs/user-guide/backups.md)
+- [Cron jobs](/docs/user-guide/cron-jobs.md)
+- [Databases](/docs/user-guide/databases.md)
+- [DNS](/docs/user-guide/dns.md)
+- [File manager](/docs/user-guide/file-manager.md)
+- [Mail domains](/docs/user-guide/mail-domains.md)
+- [Notifications](/docs/user-guide/notifications.md)
+- [Packages](/docs/user-guide/packages.md)
+- [Statistics](/docs/user-guide/statistics.md)
+- [Users](/docs/user-guide/users.md)
+- [Web domains](/docs/user-guide/web-domains.md)
+
+## Server administration
+
+- [Backup & restore](/docs/server-administration/backup-restore.md)
+- [Configuration](/docs/server-administration/configuration.md)
+- [Customisation](/docs/server-administration/customisation.md)
+- [Databases & phpMyAdmin](/docs/server-administration/databases.md)
+- [DNS clusters & DNSSEC](/docs/server-administration/dns.md)
+- [Email](/docs/server-administration/email.md)
+- [File manager](/docs/server-administration/file-manager.md)
+- [Firewall](/docs/server-administration/firewall.md)
+- [OS upgrades](/docs/server-administration/os-upgrades.md)
+- [Rest API](/docs/server-administration/rest-api.md)
+- [SSL certificates](/docs/server-administration/ssl-certificates.md)
+- [Web templates & caching](/docs/server-administration/web-templates.md)
+- [Troubleshooting](/docs/server-administration/troubleshooting.md)
+
+## Contributing
+
+- [Building Packages](/docs/contributing/building.md)
+- [Development](/docs/contributing/development.md)
+- [Documentation](/docs/contributing/documentation.md)
+- [Quick install app](/docs/contributing/quick-install-app.md)
+- [Testing](/docs/contributing/testing.md)
+- [Translations](/docs/contributing/translations.md)
+
+## Community
+
+- [Hestia Nginx Cache](/docs/community/hestia-nginx-cache.md)
+- [Ioncube installer for Hestia](/docs/community/ioncube-hestia-installer.md)
+- [Install script generator](/docs/community/install-script-generator.md)
+
+## Reference
+
+- [API](/docs/reference/api.md)
+- [CLI](/docs/reference/cli.md)

+ 34 - 27
docs/docs/reference/cli.md

@@ -552,7 +552,6 @@ add webmail support for a domain
 ```bash
 ```bash
 v-add-sys-webmail user domain.com
 v-add-sys-webmail user domain.com
 example: v-add-sys-webmail user domain.com snappymail
 example: v-add-sys-webmail user domain.com snappymail
-example: v-add-sys-webmail user domain.com rainloop
 example: v-add-sys-webmail user domain.com roundcube
 example: v-add-sys-webmail user domain.com roundcube
 ```
 ```
 
 
@@ -675,22 +674,6 @@ add system quota
 This function enables filesystem quota on /home partition
 This function enables filesystem quota on /home partition
 Some kernels do require additional packages to be installed first
 Some kernels do require additional packages to be installed first
 
 
-## v-add-sys-rainloop
-
-Install Rainloop webmail client
-
-**Options**: `[MODE]`
-
-This function installs the Rainloop webmail client.
-
-## v-add-sys-snappymail
-
-Install SnappyMail webmail client
-
-**Options**: `[MODE]`
-
-This function installs the SnappyMail webmail client.
-
 ## v-add-sys-roundcube
 ## v-add-sys-roundcube
 
 
 Install Roundcube webmail client
 Install Roundcube webmail client
@@ -742,6 +725,14 @@ v-add-sys-smtp-relay srv.smtprelay.tld uname123 pass12345
 
 
 This function adds system wide smtp relay support.
 This function adds system wide smtp relay support.
 
 
+## v-add-sys-snappymail
+
+Install SnappyMail webmail client
+
+**Options**: `[MODE]`
+
+This function installs the SnappyMail webmail client.
+
 ## v-add-user
 ## v-add-user
 
 
 add system user
 add system user
@@ -866,7 +857,7 @@ v-add-web-domain admin wonderland.com 192.18.22.43 yes www.wonderland.com
 
 
 This function adds virtual host to a server. In cases when ip is
 This function adds virtual host to a server. In cases when ip is
 undefined in the script, "default" template will be used. The alias of
 undefined in the script, "default" template will be used. The alias of
-<www.domain.tld> type will be automatically assigned to the domain unless
+`www.domain.tld` type will be automatically assigned to the domain unless
 "none" is transmited as argument. If ip have associated dns name, this
 "none" is transmited as argument. If ip have associated dns name, this
 domain will also get the alias domain-tpl.$ipname. An alias with the ip
 domain will also get the alias domain-tpl.$ipname. An alias with the ip
 name is useful during the site testing while dns isn't moved to server yet.
 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
 
 
 This function download back-up from remote server
 This function download back-up from remote server
 
 
+## v-dump-database
+
+Dumps database contents in STDIN / file
+
+**Options**: `USER` `DATABASE` `[FILE]`
+
+**Examples**:
+
+```bash
+v-dump-database user user_databse > test.sql
+example: v-dump-database user user_databse file
+```
+
+Dumps database in STDIN or /backup/user.database.type.sql
+
 ## v-export-rrd
 ## v-export-rrd
 
 
 export rrd charts as json
 export rrd charts as json
@@ -3343,7 +3349,7 @@ generate password hash
 **Examples**:
 **Examples**:
 
 
 ```php
 ```php
-	v-generate-password-hash sha-512 rAnDom_string yourPassWord
+		v-generate-password-hash sha-512 rAnDom_string yourPassWord
 ```
 ```
 
 
 This function generates password hash
 This function generates password hash
@@ -4641,13 +4647,6 @@ rebuild all assets for a specified user
 
 
 This function rebuilds all assets for a user account:
 This function rebuilds all assets for a user account:
 
 
-- Web domains
-- DNS zones
-- Mail domains
-- Databases
-- Cron Jobs
-- User account configuration
-
 ## v-rebuild-cron-jobs
 ## v-rebuild-cron-jobs
 
 
 rebuild cron jobs
 rebuild cron jobs
@@ -5870,7 +5869,7 @@ This function of updating all hestia packages
 
 
 Install update from Git repository
 Install update from Git repository
 
 
-**Options**: `REPOSITORY` `BRANCH` `INSTALL` `[PACKAGES]`
+**Options**: `REPOSITORY` `BRANCH` `INSTALL`
 
 
 **Examples**:
 **Examples**:
 
 
@@ -6210,3 +6209,11 @@ update web templates
 **Options**: `[RESTART]` `[SKIP]`
 **Options**: `[RESTART]` `[SKIP]`
 
 
 This function for obtaining updated web (Nginx/Apache2/PHP) templates from the Hestia package.
 This function for obtaining updated web (Nginx/Apache2/PHP) templates from the Hestia package.
+
+## v-update-white-label-logo
+
+update white label logo's
+
+**Options**: `[DOWNLOAD]`
+
+Replace Hestia logos with User created logo's

+ 68 - 1
docs/docs/server-administration/troubleshooting.md

@@ -35,7 +35,7 @@ The error message states (98) Address already in use: AG0072: make_sock: could n
 
 
 When a package update sometimes comes with a new config and probally it has been overwritten...
 When a package update sometimes comes with a new config and probally it has been overwritten...
 
 
-```batch
+```bash
 Configuration file '/etc/apache2/apache2.conf'
 Configuration file '/etc/apache2/apache2.conf'
  ==> Modified (by you or by a script) since installation.
  ==> Modified (by you or by a script) since installation.
  ==> Package distributor has shipped an updated version.
  ==> 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
 xxxxxx is the date/time the backup is made during the last update of HestiaCP
 xxxxxx is the date/time the backup is made during the last update of HestiaCP
 
 
 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
 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
+
+## Unable to bind adress
+
+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.
+
+```bash
+systemctl status nginx
+```
+
+Will create the error an error
+
+```bash
+nginx: [emerg] bind to x.x.x.x:80 failed (99: cannot assign requested address)
+```
+
+or in case of Aapche2
+
+```bash
+(99)Cannot assign requested address: AH00072: make_sock: could not bind to address x.x.x.x:8443
+```
+
+The following command should allow services to assign to non existing ip addresses
+
+```bash
+sysctl -w net.ipv4.ip_nonlocal_bind=1
+```
+
+## Error: 24: Too many open files
+
+```bash
+2022/02/21 15:04:38 [emerg] 51772#51772: open() "/var/log/apache2/domains/<redactedforprivacy>.error.log" failed (24: Too many open files)
+```
+
+or
+
+```bash
+2022/02/21 15:04:38 [emerg] 2724394#2724394: open() "/var/log/nginx/domains/xxx.error.log" failed (24: Too many open files)
+```
+
+This error means that there are to many open files with Nginx. To resolve this issue:
+
+/etc/systemd/system/nginx.service.d/override.conf
+
+```bash
+[Service]
+LimitNOFILE=65536
+```
+
+Then run:
+
+```bash
+systemctl daemon-reload
+```
+
+Add this to the Nginx config file (Needs to be smaller or equal to LimitNOFILE!)
+
+```bash
+worker_rlimit_nofile 16384
+```
+
+And then restart nginx with systemctl restart nginx
+
+To verifiy run:
+
+```bash
+cat /proc/ < nginx-pid > /limits
+```