I hereby claim:
- I am uhlhosting on github.
- I am kosmos (https://keybase.io/kosmos) on keybase.
- I have a public key ASCST8u0PSOrtvxm7PYk_ke531LkuCyRhAykiIl1hJ1PnAo
To claim this, I am signing this object:
# Installing prerequisites for BTCPayServer development on Ubuntu | |
# Install .NET Core SDK 2.2 | |
# https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/install?initial-os=linux | |
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb | |
sudo dpkg -i packages-microsoft-prod.deb | |
sudo add-apt-repository universe |
/etc/default/alfio | |
---- | |
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre | |
MODE=service | |
#PORT=9001 | |
JAVA_OPTS="-Ddatasource.driver=org.postgresql.Driver -Ddatasource.url=jdbc:postgresql://localhost:5433/alfio -Ddatasource.username=alfio -Ddatasource.password=secret -Ddatasource.dialect=PGSQL -Ddatasource.validationQuery='SELECT 1'" |
#!/bin/bash | |
# Installation: | |
# | |
# 1. vim /etc/ssh/sshd_config | |
# PrintMotd no | |
# | |
# 2. vim /etc/pam.d/login | |
# # session optional pam_motd.so | |
# |
I hereby claim:
To claim this, I am signing this object:
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
/* Lets not rely on paths in the database, they can be very wrong when moving between dev/stage/live environments */ | |
/* The following two variables are backward to my thinking, but hey, what ya gonna do? */ | |
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . ''); // This is NOT the 'wordpress admin area' home, but the site's home | |
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/SECRETDIRECTORY'); // This isn't the site's URL but the WordPress admin area URL | |
/* MySQL settings */ | |
switch($_SERVER['SERVER_NAME']){ | |
// Your local machine's settings | |
case 'mysite.local': | |
define('DB_NAME', 'dev_mysite'); |
--- | |
- hosts: all | |
sudo: yes | |
tasks: | |
- name: Update packages list | |
apt: update_cache=yes | |
when: ansible_os_family == 'Debian' | |
- name: List packages to upgrade (1/2) |
For this example i shall be using a dedicated server from Hertzner.https://www.hetzner.de/en/. A shout out to hetzner if your looking for cheap and beefy dedicated hosting then these guys are your best bet.
This guide assumes your server has Debian 8 (Jessie installed)
#!/bin/bash | |
# Installation: | |
# | |
# 1. vim /etc/ssh/sshd_config | |
# PrintMotd no | |
# | |
# 2. vim /etc/pam.d/login | |
# # session optional pam_motd.so | |
# |