Skip to content

Instantly share code, notes, and snippets.

Sina Owolabi sinaowolabi

Block or report user

Report or block sinaowolabi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@RafPe
RafPe / vyos_sample_site-2-site_vpn.sh
Created Jun 5, 2016
Vyos sample site-to-site vpn configuration
View vyos_sample_site-2-site_vpn.sh
# Virtual Tunnel Interface
# 172.196.17.188 - 172.196.17.191
set interfaces vti vti0 address 172.196.17.190/30
set interfaces vti vti0 description 'Virtual tunnel interface for VPN tunnel'
# Phase 2
set vpn ipsec esp-group ESP-Default compression 'disable'
set vpn ipsec esp-group ESP-Default lifetime '3600'
set vpn ipsec esp-group ESP-Default mode 'tunnel'
set vpn ipsec esp-group ESP-Default pfs 'dh-group16'
@PiBa-NL
PiBa-NL / haproxy, remove 'app' after selecting backend
Last active Feb 9, 2020
haproxy, remove /app after selecting backend
View haproxy, remove 'app' after selecting backend
Code to change a request from / to /app1/
reqirep ^([^\ :]*)\ /(.*) \1\ /app1/\2
If urls in the response contain absolute urls it might be required to use this:
acl no_redir url_beg /app1/
reqirep ^([^\ :]*)\ /(.*) \1\ /app1/\2 if !no_redir
The code makes sure that the method and url-path behind the / stays the same. Which method you need exactly might depend on the application thats running.
For readability of the above how change a request from /app1/ to /app1/app1redir/
reqirep ^([^\ :]*)\ /app1/(.*) \1\ /app1/app1redir/\2
You can’t perform that action at this time.