Table of contents

Child pages

Related pages

Providers

1&1 / 1and1

How to set up Filezilla for FTP into 1&1

  1. Follow the instructions here: 1&1 - Configure FileZilla with the 1&1 Configuration File
  2. Once you connect with Filezilla, it'll ask you for a password. It's in LastPass as "1and1 SFTP (w/ Filezilla)".

Misc


Digital Ocean

Things to be aware of

Tutorials I used to get Rhymecraft working on a DigitalOcean droplet

  1. 2017.12.20 - DigitalOcean - How To Install Python 3 and Set Up a Local Programming Environment on Ubuntu 16.04
  2. 2015.04.29 - DigitalOcean - How To Set Up an Apache, MySQL, and Python (LAMP) Server Without Frameworks on Ubuntu 14.04
  3. 2013.07.03 - DigitalOcean - How To Deploy a Flask Application on an Ubuntu VPS
    1. I used this to install mod_wsgi, to configure and enable a new Virtual Host, and to create a wsgi file. I skipped steps 2 and 3 (on creating a sample app and installing Flask).
  4. ReadTheDocs - virtualenvwrapper - Installation
  5. 2018.03.07 - DigitalOcean - How To Install Node.js on Ubuntu 16.04
  6. 2012.10.13 - Graham Dumpleton - Why are you using embedded mode of mod_wsgi?
    1. I used this to switch Apache from using embedded mode to daemon mode for my application, which is apparently the better way to serve Python web apps because Apache doesn't dynamically start and stop new Python processes (which has a performance overhead) but instead just keeps the same processes running.
  7. I uninstalled the default mod_wsgi and instead installed it from within my venv by running pip install mod_wsgi.
    1. I then needed to run "mod_wsgi-express module-config" (as described here) to output two config lines (seen below) that I then needed to put into the wsgi.load file (path listed below), replacing the existing line that was in that file.
      1. File path:

        • /etc/apache2/mods-enabled/wsgi.load
      2. Output of "mod_wsgi-express module-config" / new contents of wsgi.load:
        • LoadModule wsgi_module "/home/nathan/.virtualenvs/rhymecraft/lib/python3.5/site-packages/mod_wsgi/server/mod_wsgi-py35.cpython-35m-x86_64-linux-gnu.so"
          WSGIPythonHome "/home/nathan/.virtualenvs/rhymecraft"
  8. I also had to:
    1. upload some files required by the application that were not in the git repo (production.yaml, the background image)
    2. add encoding='utf-8' to a .readlines() call that was raising a UnicodeDecodeError
    3. comment out two lines that enabled SSLify for my application, as I didn't have SSL set up yet and it was forcing my browser to use the https protocol to connect to the website.
  9. 2016.04.21 - DigitalOcean - How To Secure Apache with Let's Encrypt on Ubuntu 16.04
    1. I used this guide to get SSL set up.
    2. I hit an error when running the 'certbot' command that took me a long time to fix: "Name duplicates previous WSGI daemon definition".
      1. The solution was to move the WSGIDaemonProcess and WSGIProcessGroup lines out of the <virtualhost:*80> tags to the top of the sites-available/rhymecraft.conf file, and then copy the entire <virtualhost></virtualhost> thing and paste it below, and then just change the "*:80" to ":*443" (for the SSL).  (Source)
    3. I had also turned off two SSL options in Cloudflare to get HTTP working, so I had to re-enable those to get the website to work.
  10. 2016.10.21 - DigitalOcean - How to Connect to a MySQL Server Remotely with MySQL Workbench
    1. I used this guide to connect to the DO MySQL db from my local computer using MySQL Workbench.
    2. Note that if you created a non-root user as recommended in one of the guides above for SSHing into the server, it seems you still need to connect as the user "root" here.
    3. Note that MySQL Workbench asked me for two passwords when connecting. The first password was for the SSH private key file, even though I was running Pageant, and the second password was for the MySQL db.
  11. MySQL Documentation - SQL Data Export and Import Wizard
    1. I used this tutorial to export the database schema, tables, and data from PythonAnywhere.
  12. Setting Up Cron Job Using crontab (pdf)
    1. I used this tutorial to set up the generate_videos.sh cronjob.
  13. GitHub - Connecting to GitHub with SSH
    1. I followed these instructions to generate an SSH public/private key pair on the DigitalOcean server, so that I could add the public key to my Bitbucket account and then be able to do a git pull from Bitbucket.
  14. AskUbuntu - Install ffmpeg in Ubuntu 12.04 LTS
    1. I followed these instructions to install ffmpeg.

Errors and how to fix them

Topics

Serverless architectures

Cloud vs. co-location

Comparison of different cloud providers / VPSes