For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
if ($request_uri = /) { | |
set $test A; | |
} | |
if ($host ~* teambox.com) { | |
set $test "${test}B"; | |
} | |
if ($http_cookie !~* "auth_token") { | |
set $test "${test}C"; |
Scenario: you already have an app running at http://your.server.com/ and you want to run Sentry at http://your.server.com/sentry/
I spend a few hours banging my head against this, and finally got it to work. There may be a better way, but I couldn't find it.
Warning: hacky.
#!./bin/knife exec | |
# A knife exec script to change chef node's name, preserving all the attributes. | |
# | |
# Usage: knife exec rename-node.rb old-name new-name | |
# | |
# Script retrieves the Node object, changes its 'name' attribute, | |
# creates new Node object with updated name and rest of attributes | |
# untouched. Then it deletes old Node and Client objects from | |
# database, and logs into the server to update it: |
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |
# force HTTP to HTTPS - /etc/nginx/conf.d/nonssl.conf | |
server { | |
listen 80; | |
server_name jira.example.com; | |
access_log off; | |
return 301 https://$server_name$request_uri; | |
} | |
# /etc/nginx/conf.d/jira.conf | |
server { |
# | |
# A CORS (Cross-Origin Resouce Sharing) config for nginx | |
# | |
# == Purpose | |
# | |
# This nginx configuration enables CORS requests in the following way: | |
# - enables CORS just for origins on a whitelist specified by a regular expression | |
# - CORS preflight request (OPTIONS) are responded immediately | |
# - Access-Control-Allow-Credentials=true for GET and POST requests |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
__author__ = "Adrien Pujol - http://www.crashdump.fr/" | |
__copyright__ = "Copyright 2013, Adrien Pujol" | |
__license__ = "Mozilla Public License" | |
__version__ = "0.3" | |
__email__ = "[email protected]" | |
__status__ = "Development" | |
__doc__ = "Check a TLS certificate validity." |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |