public:computers:vps_tips_tricks
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| public:computers:vps_tips_tricks [06/03/25 15:08 GMT] – [Security] john | public:computers:vps_tips_tricks [05/07/25 16:55 BST] (current) – [06/04/25 : Renew SSL certificate] john | ||
|---|---|---|---|
| Line 10: | Line 10: | ||
| * SSL Certificate replaced to enable HTTPS | * SSL Certificate replaced to enable HTTPS | ||
| </ | </ | ||
| + | |||
| + | ===== New VPS : March 2025 ===== | ||
| + | |||
| + | * New VPS 1 obtained at Fasthosts | ||
| + | |||
| + | < | ||
| + | Type: | ||
| + | Size:vps 1 2 60 | ||
| + | Cpu:1 vCore | ||
| + | RAM:2 GB | ||
| + | Disk:60 GB NVMe SSD | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | Distributor ID: Ubuntu | ||
| + | Description: | ||
| + | Release: | ||
| + | Codename: | ||
| + | </ | ||
| + | |||
| + | * Installed PHP and Apache2 | ||
| + | |||
| + | <code bash> | ||
| + | gm4slv@gm4slv: | ||
| + | PHP 8.3.6 (cli) (built: Dec 2 2024 12:36:18) (NTS) | ||
| + | Copyright (c) The PHP Group | ||
| + | Zend Engine v4.3.6, Copyright (c) Zend Technologies | ||
| + | with Zend OPcache v8.3.6, Copyright (c), by Zend Technologies | ||
| + | </ | ||
| + | * configured SSL per previous method [[public: | ||
| + | * changed SSH port from default 22 to a //new// port, changed VPS firewall to suit new SSH port | ||
| + | * Ubunto OS brought up to date: '' | ||
| + | |||
| + | ===== Dokuwiki Security ===== | ||
| + | |||
| + | * previous installations used .htaccess to prevent web access to data/ | ||
| + | * this time I decided not to use .htaccess but to follow the alternative instructions in [[https:// | ||
| + | |||
| + | ==== LocationMatch method ==== | ||
| + | |||
| + | Apache is told which directories (data, conf, bin, inc, vendor) to make private. The downside is that this configuration might need altering if new directories are added during '' | ||
| + | |||
| + | add to ''/ | ||
| + | <code apache> | ||
| + | < | ||
| + | Order allow,deny | ||
| + | Deny from all | ||
| + | Satisfy All | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | '' | ||
| + | |||
| + | ==== .htaccess method ==== | ||
| + | |||
| + | the secured directories in '' | ||
| + | |||
| + | |||
| + | add to ''/ | ||
| + | |||
| + | <code apache> | ||
| + | < | ||
| + | Options Indexes FollowSymLinks MultiViews | ||
| + | AllowOverride All | ||
| + | Order allow,deny | ||
| + | allow from all | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | '' | ||
| + | |||
| + | ===== SSH Security ===== | ||
| + | |||
| + | * Configured '' | ||
| + | * be careful to check the files in ''/ | ||
| + | * uploaded public keys from | ||
| + | * Puttygen for [[https:// | ||
| + | * [[https:// | ||
| + | * saved both in '' | ||
| + | * now only logins with a valid public key will succeed. | ||
| + | * In the event of a loss of the public keys it's still possible to gain access via Fasthosts account dashboard | ||
| + | * -> then reconfigure sshd to accept password logins again until new keys can be uploaded. | ||
| + | |||
| + | ===== 06/04/25 : Renew SSL certificate ===== | ||
| + | |||
| + | * Same procedure as before | ||
| + | * Download " | ||
| + | * Download " | ||
| + | * Upload via WinSCP to VPS | ||
| + | * Copy old ''/ | ||
| + | * Copy old ''/ | ||
| + | * Copy new files into ''/ | ||
| + | * Restart Apache | ||
| + | * There were 2 " | ||
| + | * I used the one named '' | ||
| + | * This is the same as the one used when I renewed '' | ||
| + | * It seems that the intermediate certificate is not unique to the domain being secured, it's a certificate that verifies the identity of the authenticator of the domain' | ||
| + | |||
| + | === UPDATE ON TWO INTERMEDIATE CERTIFICATES 5/7/25 === | ||
| + | |||
| + | I've discovered that the 2 Intermediate Certificates are necessary to complete the //chain// of authority. | ||
| + | |||
| + | What should be done is to join them together into one //ca.pem// file (and in the correct order.... ) | ||
| + | |||
| + | <code bash> | ||
| + | |||
| + | [root@wiki:/ | ||
| + | |||
| + | [root@wiki:/ | ||
| + | |||
| + | [root@wiki:/ | ||
| + | |||
| + | </ | ||
| + | |||
| + | Check correct SSL operation at [[https:// | ||
| + | |||
| + | |||
| + | ===== Old information below is for historical information ===== | ||
| <note warning> | <note warning> | ||
| Line 22: | Line 140: | ||
| </ | </ | ||
| - | ===== Old information below is for historical information ===== | + | |
| < | < | ||
| OS : Debian 10 (Buster) | OS : Debian 10 (Buster) | ||
| Line 38: | Line 156: | ||
| ==== Access via FastHosts ==== | ==== Access via FastHosts ==== | ||
| - | * browse to [[https:// | + | * browse to [[https:// |
| ===== Installing SSL for HTTPS ===== | ===== Installing SSL for HTTPS ===== | ||
| ==== Create Certificates ==== | ==== Create Certificates ==== | ||
| Line 183: | Line 301: | ||
| * restarted apache '' | * restarted apache '' | ||
| * check new valid certificate now in use in web browser | * check new valid certificate now in use in web browser | ||
| - | * {{:public:linux: | + | * {{:public:computers: |
| * Validity Issued on & Expires on dates now show new certificate is in use | * Validity Issued on & Expires on dates now show new certificate is in use | ||
| - | ===== New VPS : March 2025 ===== | ||
| - | |||
| - | * New VPS 1 obtained at Fasthosts | ||
| - | |||
| - | < | ||
| - | Type: | ||
| - | Size:vps 1 2 60 | ||
| - | Cpu:1 vCore | ||
| - | RAM:2 GB | ||
| - | Disk:60 GB NVMe SSD | ||
| - | </ | ||
| - | |||
| - | < | ||
| - | Distributor ID: Ubuntu | ||
| - | Description: | ||
| - | Release: | ||
| - | Codename: | ||
| - | </ | ||
| - | |||
| - | * Installed PHP and Apache2 | ||
| - | |||
| - | <code bash> | ||
| - | gm4slv@gm4slv: | ||
| - | PHP 8.3.6 (cli) (built: Dec 2 2024 12:36:18) (NTS) | ||
| - | Copyright (c) The PHP Group | ||
| - | Zend Engine v4.3.6, Copyright (c) Zend Technologies | ||
| - | with Zend OPcache v8.3.6, Copyright (c), by Zend Technologies | ||
| - | </ | ||
| - | * configured SSL per previous method [[public: | ||
| - | * changed SSH port from default 22 to a //new// port, changed VPS firewall to suit new SSH port | ||
| - | * Ubunto OS brought up to date: '' | ||
| - | |||
| - | ===== Dokuwiki Security ===== | ||
| - | |||
| - | * previous installations used .htaccess to prevent access to conf/ | ||
| - | * this time I decided not to use .htaccess but to follow the alternative instructions in [[https:// | ||
| - | |||
| - | ==== Location Match method ==== | ||
| - | |||
| - | Apache is told which directories (data, conf, bin, inc, vendor) to make private. The downside is that this configuration might need altering if new directories are added during '' | ||
| - | |||
| - | add to ''/ | ||
| - | <code apache> | ||
| - | < | ||
| - | Order allow,deny | ||
| - | Deny from all | ||
| - | Satisfy All | ||
| - | </ | ||
| - | </ | ||
| - | |||
| - | '' | ||
| - | |||
| - | ==== .htaccess method ==== | ||
| - | |||
| - | the secured directories in '' | ||
| - | |||
| - | |||
| - | add to ''/ | ||
| - | |||
| - | <code apache> | ||
| - | < | ||
| - | Options Indexes FollowSymLinks MultiViews | ||
| - | AllowOverride All | ||
| - | Order allow,deny | ||
| - | allow from all | ||
| - | </ | ||
| - | </ | ||
| - | |||
| - | '' | ||
| - | // | ||
| Page Updated : ~~LASTMOD~~ | Page Updated : ~~LASTMOD~~ | ||
public/computers/vps_tips_tricks.1741273736.txt.gz · Last modified: by john
