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
Last revisionBoth sides next revision
server_configuration [2021/01/13 16:41] davidserver_configuration [2021/02/27 09:52] – [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]] 
 + 
 +Also (for me): 
 +  * [[server configuration:video notes]]
  
 ====== Server Migration ====== ====== Server Migration ======
Line 52: Line 62:
 ==== 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 77:
  
 # More # More
-service --status-all|more+service --status-all | more
 </code> </code>
  
Line 89: Line 99:
 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 113:
 ==== 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. 
- +
-Some related notes: +
-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'd 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. I got the error "the session allows sftp connections only" when trying to ''ssh''. Removing the account from the group fixed things. +
- +
-<code bash> +
-# Craete sftp group and add user +
-groupadd sftp +
-usermod -a -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> +
 ==== Firewall ==== ==== Firewall ====
  
Line 135: Line 123:
   * Ubuntu Documentation: [[https://ubuntu.com/server/docs/security-firewall|Ubuntu firewall]]   * Ubuntu Documentation: [[https://ubuntu.com/server/docs/security-firewall|Ubuntu firewall]]
  
-==== 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 155: Line 143:
   * 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 181: Line 172:
  
 === 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.txt
  • Last modified: 2021/04/14 08:59
  • by david