Skip to content

Instantly share code, notes, and snippets.

View dhirajforyou's full-sized avatar
💭
Code to make life simple

dhirajforyou dhirajforyou

💭
Code to make life simple
  • Bangalore Karnataka
View GitHub Profile
@dhirajforyou
dhirajforyou / gist:0b989e2562c90c8217ef0ec64ca3bf2c
Created November 9, 2016 11:30 — forked from gansbrest/gist:6983561
Internal redirect to another domain with proxy_pass and Nginx
server
{
listen 80;
server_name a.com b.com c.com;
location ~* ^/comment/(.*) {
proxy_set_header HOST shared.com;
# $1 - stores capture from the location on top
# $is_args will return ? if there are query params
# $args stores query params
@dhirajforyou
dhirajforyou / example.com.conf
Created November 9, 2016 11:29 — forked from a-vasyliev/example.com.conf
Nginx: proxy cache without utm_* parameters (remove query parameter, remove utm tags nginx)
server {
listen 443;
server_name example.com;
error_log /var/log/nginx/example_com_error.log warn;
ssl on;
ssl_certificate /etc/nginx/ssl/your.crt; #certificate chains
ssl_certificate_key /etc/nginx/ssl/your.key; #private key