Welcome to bbowden super wiki!!!!
10/21/2018
nginx redirect
Here’s a very simple example that redirects clients to a new domain name:
server {
listen 80;
listen 443 ssl;
server_name www.old-name.com;
return 301 $scheme://www.new-name.com$request_uri;
}
The listen
directives mean the server
block applies to both HTTP and HTTPS traffic. The server_name
directive matches request URLs that have domain name www.old‑name.com. The return
directive tells NGINX to stop processing the request and immediately send code 301
(Moved
Permanently)
and the specified rewritten URL to the client. The rewritten URL uses two NGINX variables to capture and replicate values from the original request URL: $scheme
is the protocol (http or https) and $request_uri
is the full URI including arguments.
copied from : https://www.nginx.com/blog/creating-nginx-rewrite-rules/
12/14/2017
Chef Work
xml
https://grantm.github.io/perl-libxml-by-example/xpath.html
https://www.perlmonks.org/?node_id=877166
http://grantm.github.io/perl-libxml-by-example/_static/xpath-sandbox/xpath-sandbox.html
https://stackoverflow.com/questions/10404152/perl-script-to-parse-xml-using-xmllibxml
terraform
https://hackernoon.com/introduction-to-aws-with-terraform-7a8daf261dc0
https://www.terraform.io/docs/providers/aws/r/instance.html
https://thecode.pub/creating-your-cloud-servers-with-terraform-bfa01a499bad
https://christinemdraper.wordpress.com/2015/10/04/deploying-a-multi-node-application-to-aws-using-terraform-and-chef/comment-page-1/
https://christinemdraper.wordpress.com/2015/10/04/deploying-a-multi-node-application-to-aws-using-terraform-and-chef/comment-page-1/
https://gist.github.com/yuyawata/5c5ab89e99b98e3a7008f4d0db169ac8
trying to append to a file
The redirection is done by the shell before sudo is even started. So either make sure the redirection happens in a shell with the right permissions
sudo bash -c 'echo "hello" >> f.txt'
1/1/2015 Happy New Year
Book: http://www.ubookcase.com/book/Oreilly/Python.Cookbook.2nd.edition/
Comments (0)
You don't have permission to comment on this page.