This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Windows AMIs don't have WinRM enabled by default -- this script will enable WinRM | |
# AND install 7-zip, curl and .NET 4 if its missing. | |
# Then use the EC2 tools to create a new AMI from the result, and you have a system | |
# that will execute user-data as a PowerShell script after the instance fires up! | |
# This has been tested on Windows 2008 SP2 64bits AMIs provided by Amazon | |
# | |
# Inject this as user-data of a Windows 2008 AMI, like this (edit the adminPassword to your needs): | |
# | |
# <powershell> | |
# Set-ExecutionPolicy Unrestricted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<system.webServer> | |
<handlers> | |
<remove name=”ExtensionlessUrlHandler-ISAPI-4.0_32bit” /> | |
<remove name=”ExtensionlessUrlHandler-ISAPI-4.0_64bit” /> | |
<remove name=”ExtensionlessUrlHandler-Integrated-4.0" /> | |
<add name=”ExtensionlessUrlHandler-ISAPI-4.0_32bit” path=”*.” verb=”GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS” modules=”IsapiModule” scriptProcessor=”%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll” preCondition=”classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit=”0" /> | |
<add name=”ExtensionlessUrlHandler-ISAPI-4.0_64bit” path=”*.” verb=”GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS” modules=”IsapiModule” scriptProcessor=”%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll” preCondition=”classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit=”0" /> | |
<add name=”ExtensionlessUrlHandler-Integrated-4.0" path=”*.” verb=”GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS” type=”System.Web.Handlers.TransferRequestHandler” preCondition=”integratedMode,runtimeVersionv4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Http; | |
using System.Web.Http; | |
using System.Web.Http.Cors; | |
namespace LeonKyr.Demo.Api.Controllers | |
{ | |
[EnableCors("*", "*", "*")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Registers the specified configuration. | |
/// </summary> | |
/// <param name="config">The configuration.</param> | |
public static void Register(HttpConfiguration config) | |
{ | |
// This should be before call of MapHttpAttributeRoutes() | |
config.EnableCors(); | |
ConfigureDependencyResolver(config); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Recommended minimum configuration: | |
# | |
sslproxy_capath /etc/opt/csw/ssl/certs | |
#cache_effective_user root | |
# Example rule allowing access from your local networks. | |
# Adapt to list your (internal) IP networks from where browsing | |
# should be allowed | |
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network | |
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /usr/local/squid | |
sudo mkdir ssl_cert | |
sudo chown nobody:nobody | |
chmod 700 ssl_cert | |
cd ssl_cert | |
openssl req -new -newkey rsa:2048 -sha256 -days 365 -nodes -x509 -keyout myCA.pem -out myCA.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /usr/local/squid/ssl_cert | |
openssl x509 -in myCA.pem -outform DER -out myCA.der | |
cp myCA.der ~/myCA.der | |
# sftp vagrant@test | |
# get ~/myCA.der |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo mkdir -p /usr/local/squid/var/lib/ssl_db | |
sudo /usr/local/squid/libexec/ssl_crtd -c -s /usr/local/var/lib/ssl_db | |
sudo chown nobody:nobody -R /usr/local/squid/var/lib/ssl_db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~ | |
mkdir squid | |
cd squid | |
wget http://www.squid-cache.org/Versions/v3/3.5/squid-3.5.3.tar.gz | |
tar xvzf squid-3.5.3.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install build-essential | |
sudo apt-get install autoconf g++ python2.7-dev |
OlderNewer