Skip to content

Instantly share code, notes, and snippets.

View t0nyandre's full-sized avatar
🏆
Dedicated Gopher!

Tony André Haugen t0nyandre

🏆
Dedicated Gopher!
View GitHub Profile
{
"basics": {
"name": "Tony André Haugen",
"label": "Full Stack Developer",
"picture": "https://avatars3.githubusercontent.com/u/8478766?s=460&u=84ddc440dab9322f81d8e90325e640713215b6b5&v=4",
"email": "post@tonyandre.co",
"phone": "+4746668969",
"website": "https://tonyandre.co",
"summary": "Team player software developer with a can-do attitude and with good time management skills, and a love for good code. Has developed several web apps and apis for personal use and for customers.",
"location": {
### Keybase proof
I hereby claim:
* I am t0nyandre on github.
* I am t0nyandre (https://keybase.io/t0nyandre) on keybase.
* I have a public key whose fingerprint is CA1E 641F 13B5 2993 B4A1 A9B3 6402 9E3E 1D77 6497
To claim this, I am signing this object:
@t0nyandre
t0nyandre / nginxproxy.md
Created September 25, 2018 15:12 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

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

@t0nyandre
t0nyandre / nginxproxy.md
Created September 25, 2018 15:12 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

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

### Dockerfile
FROM crystallang/crystal
WORKDIR /usr/app
COPY ./ ./
RUN shards install
package main
import (
"encoding/csv"
"fmt"
"io/ioutil"
"os"
"runtime"
"strconv"
"strings"
zmartazz@coding-comp:~$ curl --verbose cis.poly.edu:80
* About to connect() to cis.poly.edu port 80 (#0)
* Trying 128.238.32.79...
* connected
* Connected to cis.poly.edu (128.238.32.79) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.26.0
> Host: cis.poly.edu
> Accept: */*
>