server_configuration

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
server_configuration [2021/01/13 16:10] davidserver_configuration [2021/04/14 08:59] (current) – [Detail Pages] david
Line 1: Line 1:
-For the hosting of this wiki, my blog [[http://datablog.roman-halliday.com/|Rows Across The Lake]] and other things, I have a VM web host. +====== Server Configuration - Virtual Host ====== 
 + 
 +For the hosting of this wiki, my blog [[http://datablog.roman-halliday.com/|Rows Across The Lake]] and other things, I have a VM web host. Inspired by my migration efforts, I'm documenting the changes and challenges for next time. 
 + 
 +Some useful notes from the first server are hidden away under [[server:initial_setup]] (access limited for security reasons).
  
 ====== Hosting Provider ====== ====== Hosting Provider ======
Line 11: Line 15:
 See: See:
  
-  * [[server_configuration:apache]] +  * [[server configuration:apache]] 
-  * [[server_configuration:firewall]] +  * [[server configuration:firewall]] 
-  * [[server_configuration:email]] +  * [[server configuration:email]] 
-  * [[server_configuration:cron]]+  * [[server configuration:cron]] 
 +  * [[server configuration:wiki]] 
 +  * [[server configuration:sftp]] 
 +  * [[server configuration:postgres]] 
 +  * [[server configuration:squid]] 
 + 
 +Also (for me): 
 +  * [[server configuration:video notes]]
  
 ====== Server Migration ====== ====== Server Migration ======
Line 52: Line 63:
 ==== Get configuration ==== ==== Get configuration ====
  
-Gollowing advice from:+Following advice from:
   * DigitalOcean Community Documentation: [[https://www.digitalocean.com/community/tutorials/how-to-migrate-linux-servers-part-1-system-preparation|How To Migrate Linux Servers Part 1 - System Preparation]]   * DigitalOcean Community Documentation: [[https://www.digitalocean.com/community/tutorials/how-to-migrate-linux-servers-part-1-system-preparation|How To Migrate Linux Servers Part 1 - System Preparation]]
  
Line 67: Line 78:
  
 # More # More
-service --status-all|more+service --status-all | more
 </code> </code>
  
Line 89: Line 100:
 As root As root
 <code bash> <code bash>
 +# create a user for me
 +adduser david
 +
 # Add my user to sudo # Add my user to sudo
 groupadd david sudo groupadd david sudo
Line 100: Line 114:
 ==== SFTP ==== ==== SFTP ====
  
-Basic SFTP was already available/configured in the box. I did have fun as my configuration in my client application was set to point to an IP rather than the hostname.+Basic SFTP was already available/configured in the box.  
 +==== Firewall ====
  
-Some related notes+Worth looking at more detailed notes on my [[server_configuration:firewall]] configuration.
-SFTP: https://linuxconfig.org/how-to-setup-sftp-server-on-ubuntu-20-04-focal-fossa-linux +
-https://www.howtogeek.com/50787/add-a-user-to-a-group-or-second-group-on-linux/ +
-https://www.digitalocean.com/community/tutorials/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server +
-https://wordpress.org/support/topic/the-session-allows-sftp-connections-only/+
  
-Note, I'added the user account to the group "sftp" which then made it specifically an ''sftp'' account and blocked it for ''ssh'' using the basic configuration. got the error "the session allows sftp connections only" when trying to ''ssh''. Removing the account from the group fixed things.+The firewall is already configured by DigitalOcean in my choice of droplet (Ubuntu 20.04 with WordPress). However if other services are to be added (in my case yes) the [[https://ubuntu.com/server/docs/security-firewall|Ubuntu firewall]] needs to be configured. See below for some extra documentation links referred to:
  
-<code bash> +  * HowTo Geek: [[https://www.howtogeek.com/115116/how-to-configure-ubuntus-built-in-firewall|How to Configure Ubuntu’s Built-In Firewall]] 
-# Craete sftp group and add user +  * Ubuntu Documentation: [[https://ubuntu.com/server/docs/security-firewall|Ubuntu firewall]]
-groupadd sftp +
-usermod --G sftp david +
- +
-# Restart SSH 2 methods +
-systemctl restart ssh +
-service ssh reload +
- +
-# Remove user from group +
-gpasswd -d david sftp +
- +
-# View groups +
-groups david +
-</code>+
  
-==== Configure Apache & WorPress ====+==== Configure Apache & WordPress ====
  
 In general, follow scripts/prompts when first SSH into droplet. In general, follow scripts/prompts when first SSH into droplet.
Line 146: Line 144:
   * https://help.servmask.com/2018/10/27/how-to-increase-maximum-upload-file-size-in-wordpress/   * https://help.servmask.com/2018/10/27/how-to-increase-maximum-upload-file-size-in-wordpress/
  
-The two values need to be larger than the file size ''post_max_size'' and ''upload_max_filesize''. In the inteface, the value which is shown as the "Maximum upload" is (for some reason) ''post_max_size''.+The two values need to be larger than the file size ''post_max_size'' and ''upload_max_filesize''. 
 + 
 +In the interface, the value which is shown as the "Maximum upload" is (for some reason) ''post_max_size''. 
 + 
 +Edit the ''.htaccess'' file, under: ''/var/www/roman-halliday.com/datablog''
  
-Under: ''/var/www/roman-halliday.com/datablog'' +<file txt .htaccess>
-<file .htaccess>+
 php_value upload_max_filesize 256M php_value upload_max_filesize 256M
 php_value post_max_size 200M php_value post_max_size 200M
Line 172: Line 173:
  
 === Duplicator === === Duplicator ===
-I didn't use as it migrated all the WprdPress files and had some fun and games with registration:+I didn't use as it migrated all the WordPress files and had some fun and games with registration:
   * https://www.wpbeginner.com/wp-tutorials/how-to-move-wordpress-to-a-new-host-or-server-with-no-downtime/#setupduplicator   * https://www.wpbeginner.com/wp-tutorials/how-to-move-wordpress-to-a-new-host-or-server-with-no-downtime/#setupduplicator
   * https://snapcreek.com/duplicator/docs/quick-start/?   * https://snapcreek.com/duplicator/docs/quick-start/?
  • server_configuration.1610554205.txt.gz
  • Last modified: 2021/01/13 16:10
  • by david