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
#!/usr/bin/env python | |
# get_links.py | |
import re | |
import sys | |
import urllib | |
import urlparse | |
from BeautifulSoup import BeautifulSoup | |
class MyOpener(urllib.FancyURLopener): |
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
## This conf will basic auth for all exept IP from graph.facebook, twitter.. | |
<VirtualHost IP:443> | |
ServerName webapp.com | |
UseCanonicalName Off | |
ErrorLog /etc/httpd/logs/ssl_reverse_error_log | |
CustomLog /etc/httpd/logs/ssl_reverse_access_log combined env=!dontlog | |
RewriteLog "/etc/httpd/logs/ssl_rewrite.log" | |
RewriteLogLevel 3 |
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
# Just add nocanon as below | |
<Location /example/> | |
ProxyPass http://anotherserver:8080/example/ nocanon | |
</Location |
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
https://rayed.com/wordpress/?p=1496 | |
https://serversforhackers.com/monitoring-processes-with-supervisord |
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
.... | |
SetEnvIfNoCase Request_URI "^/_ui" noauth | |
<Proxy *> | |
AuthType Basic | |
AuthName "Please Log In" | |
AuthUserFile /etc/httpd/.htpasswd | |
Require valid-user | |
Order deny,allow | |
Deny from all |
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
## This will sync directory from remote machine to local | |
sudo rsync -arvz -e "ssh -i your-key.pem" ec2-user@ip-address:/path/to/dir/ temp/ | |
## scp with key | |
scp -i mykey.pem somefile.txt [email protected]:/ | |
## This will sync from local to remote | |
sudo rsync -arvz -e "ssh -i your-key.pem" temp/ ec2-user@ip-address:/path/to/dir/ |
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
## This will be fixed by | |
find /var/www -type d -exec chmod 755 {} \; | |
find /var/www -type f -exec chmod 644 {} \; |
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
So here’s how we fix it: | |
Remove the kernel’s networking interface rules file so that it can be regenerated | |
# rm /etc/udev/rules.d/70-persistent-net.rules | |
# reboot | |
Edit the network card "name" from eth1 to eth0 in 70-persistent-net.rules | |
#vi /etc/udev/rules.d/70-persistent-net.rules |
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
----- BEGIN LICENSE ----- | |
Andrew Weber | |
Single User License | |
EA7E-855605 | |
813A03DD 5E4AD9E6 6C0EEB94 BC99798F | |
942194A6 02396E98 E62C9979 4BB979FE | |
91424C9D A45400BF F6747D88 2FB88078 | |
90F5CC94 1CDC92DC 8457107A F151657B | |
1D22E383 A997F016 42397640 33F41CFC |
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
1. Requirements | |
yum install pcre* | |
yum install libxml* | |
yum install gdbm-devel | |
2. Download packages | |
apr-1.5.2.tar.gz | |
apr-util-1.5.2.tar.gz |