SSH Tunnel Notes
Ran a second local http server (in addition to xampp): f:\xampp\php> php -S 127.0.0.1:8000
phptest.htm is in this f:\xampp\php folder
Then in a browser: localhost:8000/phptest.htm
It worked!
Ran a second local http server (in addition to xampp): f:\xampp\php> php -S 127.0.0.1:8000
phptest.htm is in this f:\xampp\php folder
Then in a browser: localhost:8000/phptest.htm
It worked!
Debian 9 stretch backports for Apache2, nothing beyond v2.4.25, but can use the sury.org apache2 repository which currently has v2.4.43.
How To Configure Apache HTTP with MPM Event and PHP-FPM on Ubuntu 18.04; DigitalOcean | How to Install and Configure FastCGI and PHP-FPM on Ubuntu 18.04; Linode | How to Add PHP-FPM Support on Apache/Nginx Web Server on Ubuntu 18.04 | mod_fcgid – FastCGI interface module for Apache 2 – Apache HTTP Server Project |
htaccess snippets on github | Test htaccess rewrite rules |
AllowOverride directive | Only available in <Directory> sections | When the server finds an .htaccess file, it needs to know which directives declared in it can override earlier config directives. AllowOverride is valid only in <Directory> sections specified without regular expressions, not in <Location>, <DirectoryMatch> or <Files> sections. When this directive is set to None and AllowOverrideList is set to None, .htaccess files are completely ignored. In this case, the server will not even attempt to read .htaccess files in the filesystem. When this directive is set to All, then any directive which has the .htaccess Context is allowed in .htaccess files.
Example – Oracle Cloud Infrastructure Email Delivery Settings | Getting Started with Email Delivery | Overview of the Email Delivery Service | Dimitri Gielis Blog (Oracle Application Express – APEX): Free Oracle Cloud: 11. Sending Emails with APEX_MAIL on ATP | Oracle Always Free Oracle Database upgrades |
lscpu comparison GCE vs Oracle vs AWS Uploading files to a bucket | Object Storage Tutorial | CLI | Command Line Interface Details of Always Free Resources: Boot Volumes | Compute Instances | forum post on mulitple compute instances, subnets, network, security lists, VCN etc
Oracle Cloud forum | 13-part series on free Oracle Cloud | How to reserve and attach IP to Oracle VM instance | Launching 1st Free Instance |
Oracle instructions: Connect to a Cloud VM on Windows with PuTTY
This is a reader view version of the original article. If you missed earlier articles in this series, we covered [1. concepts], [2. ecosystem], [3. Dockerfiles], [4. slimming down images], [5. popular commands] and [6. Data in Docker]. I've got a series on Kubernetes in the works too. The Docker docs are extensive, but overwhelming when you're getting started. Here I'll highlight key commands for running vanilla Docker.
Creating a browser trusted, self signed, SSL certificate; X.509 v3 with Subject Alternate Name (SAN) Requesting certificates with Let's Encrypt's official certbot client https://shellcreeper.com/how-to-create-valid-ssl-in-localhost-for-xampp/
Q. I am using an IP Address to access my application website. Do I need a domain for an SSL? A: If it is just you and no one else (or the experience of anyone else [accidently] accessing your site does not matter), you can just use a self-signed SSL certificate for your IP, which you can create in one click at ZeroSSL for example with Self-Signed Certificate Generator | But does this work for a cloud app?
How to Install a Self-Signed SSL Certificate on Your Ubuntu 18.04 VPS or Dedicated Server | How To Create a Self-Signed SSL Certificate for Apache in Ubuntu 16.04; DigitalOcean | Creating a self-signed SSL certificate for local Docker development |
Google queries: self-signed ssl certificate for ip address self-signed ssl certificate docker container
Ed Bott's review web hosting services | caltlgin's FOSS web hosting | DataCamp Tutorials | Cheat Sheets | How to Set Up SSH for your Ubuntu 18.04 VPS or Dedicated Server Connecting to your VPS with SSH and improving security The ultimate dictionary for essential server terms SSH two-factor authentication: How to enable on your VPS Tutorial: VPS Security Audits Using Lynis | How to Audit Your Linux System’s Security with Lynis | Self-hosted alternatives: Ultimate guide to cheaper SaaS Managing SSH Keys in Google Cloud Platform Amolith uses BuyVM | BuyShared.net is an affiliate | attractive reseller accounts | BuyVM wiki |
Deploy Nextcloud thru Docker | Installing NextCloud and Collabora Office Online with Docker on Ubuntu 16.04 | How to Use Docker Containers – mte | Get to Know Docker's Ecosystem | Docker Tips 1-80+ | Google search |
docker run -d -p 8080:80 -p 443:443 -v $HOME/nextcloud:/var/www/html nextcloud
docker containers stored in /var/lib/docker/containers change install dir
delete docker images when force doesn't work | This worked for shiori golang when other commands failed: delete all images forcefully (use this command at your own risk it will delete all of your images): docker rmi $(docker images -q) -f
How to update a Docker image with new changes? | docker start <containerID> | docker exec -it <containerID> bash | karthequian/helloworld docker image: python3.6, nginx 1.14.0 (nginx -v) nextcloud official: php 7.3.9, Apache/2.4.38 (Debian) Docker tips, tricks | How to update/add a file in a Docker image | Command to exit from a Docker container without interrupting it: Ctrl+p+q You can use “Ctrl+d” command to exit from a container. But sometimes it causes issues, so using “Ctrl p q” is a good trick. Make sure that the container status using “docker ps” command. Docker tips and tricks – Docker cheat sheet | How To Get Information About a Container In Docker | How to update/add a file in the Docker Image | Building a Docker Security Program | updating Docker containers section
https://blog.ssdnodes.com/blog/getting-started-docker-vps/ https://blog.ssdnodes.com/blog/?s=docker https://blog.ssdnodes.com/blog/self-hosting-handbook/
https://hub.docker.com/_/nextcloud/ https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html
Awesome Docker list | on github |
https://github.com/schollz/rwtxt
https://docs.docker.com/samples/library/nextcloud/
Deploy Docker containers in Google Cloud Platform – Machine Box
Dokuwiki: Bitnami docker | vimagick |
https://blog.ssdnodes.com/blog/category/self-hosting/ https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-debian-9
id -nG (current user's groups)
Commit changes to a modified docker container, Step 7
Host multiple websites on one VPS with Docker and Nginx
docker stop $(docker ps -aq) docker rm $(docker ps -a -q) docker stop $(docker ps -aq) docker rmi -f $(docker images -q)
Installing Debian 10 on Google Cloud | Your own FREE ghost blog on GCP |
Deploying Containers on VMs and Managed Instance Groups; Compute Engine Documentation
Docker Tutorial series | Docker Get Started |
Google Cloud: Service Identity
docker image ls —all docker container ls —all docker ps —all docker search <appname> docker run -v ~/temp:/data -p 8080:8152 schollz/rwtxt runs on port 8080 docker run -t -i <appname> [explanation] Note: -i -t params mean it's interactive & attaches tty input, you go into container's shell docker rm <first 4 or 5 chars of Container ID>
App Engine requires that your application listens on port 8080
In the free tier, you have a limit of 12 projects. The free tier is available only for the Standard Environment (not flex env). Reddit thread: Is there is a new limit on free Google App Engine projects? : AppEngine
-—
+ Per this doc, only automatic scaling is supported in F1 instances. | “App Engine standard environment scales down to 0 instance by default so you shouldn't have to specify it in your app.yaml.” [source]
+ When you deploy your app to Google App Engine, it's automatically associated to one of the following instance types:
Frontend Instance: 28 free F1 instance-hours per day
Backend Instance: 9 free B1 instance-hours per day
By default, your app is assumed to be a Frontend Instance with automatic scaling. But if you change the app.yaml in your root directory, and introduce a configuration to enable the Basic or Manual scaling, your app will become assumed to be a Backend Instance. To ensure that your app usage will always be free, you can define the following properties in your app.yaml file
instance_class: F1
automatic_scaling:
max_instances: 1
-—
appengine project cleanup useful gcloud commands gcloud app versions list
Choosing an appengine environment
Add the —quiet flag to your gcloud command to disable all interactive prompts
When deploying using a gcloud command, specify explicitly your app's version to avoid having multiple instances being billed thus reducing your daily free hours allowance. A gcloud deploy command example would be: gcloud --quiet app deploy --version=production
[source]
-—
f1-micro only has 0.6gb RAM. So we'll need to allocate a swap file, just in case we ran out of memory. Use the commands below.
1. sudo fallocate -l 1G /swapfile
2. sudo chmod 600 /swapfile
3. sudo mkswap /swapfile
4. sudo swapon /swapfile
5. echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
Even if there is already plenty of RAM available, it's still beneficial to have swap [source]
How to add swap space to Ubuntu 18.04 | Debian 9 |
Firewall rules overview, VPC, Google Cloud | Securely connecting to VM instances |
journalctl -u ssh.service | journalctl -u network.service
faillog
netstat -tulpn | netstat -npl
tar -cvzf archive-name.tar.gz directory-name
The Compute Engine stores the disk data independently of the instance. A persistent disk's life cycle is not tied to a particular instance, making them flexible and easily migrated. Persistent disks are also encrypted, and data is encrypted the moment it leaves the instance. [source]
The gcloud CLI tool is accessible on all Compute Engine VMs when started through the console's ssh option. [source]
GCE static IP pricing | Note: Starting January 1st, 2020, GCP will introduce an additional charge for publicly addressed VM instances that don't fall under the Free Tier. You will not be charged for other publicly addressed resources, such as forwarding rules. | “Each month, eligible use of all of your f1-micro instances and associated external IP addresses are free until you have used a number of hours equal to the total hours in the current month” https://cloud.google.com/free/docs/gcp-free-tier
Installing JuypterHub on Google Compute Engine Outstanding and detailed article: Setting Up Google Cloud For Data Science (run Jupyter notebooks on GCE Compute Engine and Cloud Shell ) – DataCamp To upload and download files from the GCE terminal: gcloud compute scp source_path target_path (local folder: ./) gcloud compute scp [instance_name]:[path to file on instance] ./ To upload some local file to your instance: gcloud compute scp [local file].[instance_name]:[path]