- Follow the instructions at http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_Log4j to install log4j. Be sure to enable log4j globally by installing it to $CATALINA_BASE/lib
- Make sure your syslog daemon is configured to listen on UDP port 514
- Modify $CATALINA_BASE/lib/log4j.properties as follows (changes are highlighted)
log4j.rootLogger=INFO, CATALINA, SYSLOG # Define all the appenders
For People who hate themselves and run SELinux
If you decide to run SELinux and Apache starts throwing errors like the following:
[Tue Jan 10 14:44:42 2012] [error] (13)Permission denied: proxy: HTTP: attempt to connect to 184.108.40.206:8080 (some_host_name) failed
[Tue Jan 10 14:44:42 2012] [error] ap_proxy_connect_backend disabling worker for (some_host_name)
Chances are SELinux is stopping Apache from making network connections. To correct this problem execute
This wrapper for cssh allows you to copy/paste a vertical list of IP addresses onto the command line, such as from a spreadsheet.
#!/bin/bash echo "$@" | xargs /usr/bin/cssh &
$ cssh '220.127.116.11 18.104.22.168 22.214.171.124 126.96.36.199'
Gridviews are awesome, but what if you want to use arraylists to make them in the code-behind? For example, maybe you want to re-use the same gridview control with different data rather than have a custom control built specifically for each data set. This guide will show you how to 'self-wire' the gridview controls so you can build them directly and dynamically. This will reduce the attack surface of your web applications, making them more secure and reduce redundant code and controls, making them easier to maintain.
How to encrypt passwords in tomcat-users.xml
for a in $(seq 192 192); do for b in $(seq 168 168); do for c in $(seq 0 0); do for d in $(seq 0 255); do sh -c "arping -A -q -c 1 -T $a.$b.$c.$d $TARGET_MAC if [ \$? = 0 ]; then echo Got answer with address: $a.$b.$c.$d fi" & done wait done done done
This article gives a basic overview of how to create dynamic menus for your .net web pages.
There are three important controls to designing your dynamic menu:
- web.sitemap Control
- SiteMapDataSource Control
- Menu Control
The web.sitemap Control
The Sitemap control is an XML file that contains information about your dynamic menu. It stores your menu in a series of nested tag controls. Add this to your project by right-clicking on your project and selecting Add->New Items->Web->Site Map
This document describes how to create a fault tolerant load balancer cluster using LVS and Keepalived on Debian Lenny. LVS works off of internal firewall marks that are added to incoming packets by iptables. The example here uses firewall mark 100 to manage this internal routing for the load balanced IP address 192.168.1.100. Note that LVS uses decimal 100, where iptables uses the hex equivalent (0x64).
There is a great command line JMX client available at http://crawler.archive.org/cmdline-jmxclient/index.html which allows you to query everything JMX. This is especially useful for a quick insight into the health of your Java server. It can also be used for monitoring, but beware that every time it is run a new JVM instance is created.
The hardest parts of talking to Active Directory (or LDAP) are first learning the query language, and second figuring out what is 'good' to query and what is not. This document will focus on how to talk to active directory in a way that is quick, accurate, and most importantly easy to understand.