You should install VirtualBox and Vagrant before you start.
You should create a Vagrantfile
in an empty directory with the following content:
' Disables Vanguard from starting when you boot your computer | |
Call CreateObject("Shell.Application").ShellExecute("cmd.exe", "/c ""sc config vgc start= disabled & sc config vgk start= disabled""", "", "runas") |
#!/usr/bin/env python2 | |
import SimpleHTTPServer | |
import SocketServer | |
import logging | |
PORT = 8000 | |
class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): |
You should install VirtualBox and Vagrant before you start.
You should create a Vagrantfile
in an empty directory with the following content:
A minimal HTTP server in python. It sends a JSON Hello World for GET requests, and echoes back JSON for POST requests.
python server.py 8009
Starting httpd on port 8009...
curl http://localhost:8009
{"received": "ok", "hello": "world"}
# http://wiki.apache.org/solr/FAQ#How_can_I_delete_all_documents_from_my_index.3F
# http://wiki.apache.org/solr/UpdateXmlMessages#Updating_a_Data_Record_via_curl
curl "http://index.websolr.com/solr/a0b1c2d3/update?commit=true" -H "Content-Type: text/xml" --data-binary '<delete><query>*:*</query></delete>'
I'm amused at the traction this little gist is getting on Google! I would be remiss not to point out that six+ years later I'm still helping thousands of companies on a daily basis with their search index management, by providing managed Solr as a service over at Websolr, and hosted Elasticsearch at Bonsai. Check us out if you'd like an expert helping hand at Solr and Elasticsearch hosting, ops and support!
So HAProxy is primalery a load balancer an proxy for TCP and HTTP. But it may act as a traffic regulator. It may also be used as a protection against DDoS and service abuse, by maintening a wide variety of statistics (IP, URL, cookie) and when abuse is happening, action as denying, redirecting to other backend may undertaken ([haproxy ddos config], [haproxy ddos])
A more complete example (with rewriting cookie domains/paths) can be found at http://blog.haproxy.com/2014/04/28/howto-write-apache-proxypass-rules-in-haproxy/
We will try something roughly equivalent to the following ProxyPass
directives in Apache2:
ServerName www.example.com
...
ProxyPass /foo/ http://foo.local
ProxyPassReverse /foo/ http://foo.local
In haproxy.cfg
we define a backend, say foo, to reverse-proxy to foo.local
backend server.
#!/usr/bin/env bash | |
scriptName=$(basename "$0") | |
USAGE="Wraps \"helm package\" in order to be able to --set values at package time. | |
Usage: | |
$scriptName \\ | |
--set key1=value1 --set key2=value2 \\ | |
[--app-version 1.2.3] <chart-path>" |
8.2.2. TCP log format | |
--------------------- | |
The TCP format is used when "option tcplog" is specified in the frontend, and | |
is the recommended format for pure TCP proxies. It provides a lot of precious | |
information for troubleshooting. Since this format includes timers and byte | |
counts, the log is normally emitted at the end of the session. It can be | |
emitted earlier if "option logasap" is specified, which makes sense in most | |
environments with long sessions such as remote terminals. Sessions which match | |
the "monitor" rules are never logged. It is also possible not to emit logs for |