Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lukaszkorecki/proxy-gen

Quickly generate valid nginx proxy config
https://github.com/lukaszkorecki/proxy-gen

Last synced: 14 days ago
JSON representation

Quickly generate valid nginx proxy config

Awesome Lists containing this project

README

        

# proxy-gen

Tiny script to generate an nginx-based proxy with basic auth.

## Why is this useful?

I'm developing on a remote machine all the time, but I want to protect some
of the publicly accesible things and remain safe by locking it down as much
as possible.

## Dependencies

- Ruby
- nginx
- apache2-utils to generate valid htpasswd file

## Setup

1. Generate password file with:
- `htpasswd -c ./mypass `

2. Create your config file, you can use `proxy.yml.example` as a template

3. Run `./gen proxy.yml.example` - it will generate `proxy.conf`

4. Copy `proxy.conf` to `/etc/nginx/sites-available` and symlink it to `/etc/ngxin/sites-enables`

5. Open any ports listed in `gen`'s output using `iptables` of `ufw`
6. Reload `nginx`
7. Done!

## Problems?

Check nginx error log

---

Licensed under GPL