AWS – Setting tomcat to run in ports 80 & 443

# Checking the current iptables content on the prerouting table
$ sudo /sbin/iptables -t nat -I PREROUTING -p tcp –dport 80 -j REDIRECT –to-port 8080
$ sudo /sbin/iptables -t nat -I PREROUTING -p tcp –dport 443 -j REDIRECT –to-port 84
# Saving the rules
$ sudo /sbin/service iptables save
# Restarting ipTables:
$ sudo /etc/init.d/iptables restart
# Checking that the rules were saved succesfully
$ sudo /sbin/iptables -t nat -I PREROUTING -p tcp –dport 80 -j REDIRECT –to-port 8080

 

Reference

 

Advertisements

Leave a Comment

SQL Navigator output window

  1. Click “Show Output” icon on tool bar
  2. Alt+Space, select Move, use arrow key to move the window position

 

Leave a Comment

using underscore string…

(string…).stripTags();

Leave a Comment

Remote Debugging on WebLogic Server

  1. in /bin/startWebLogic.cmd add:
    set JAVA_OPTIONS=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=7002,server=y,suspend=n
  2. ┬áIn IDEA – Edit Run Configuration:
    Add – Remote – localhost, 7002
  3. Start Server
  4. In IDEA click Debug button (Shift + F9)

Leave a Comment

JavaScript – Find out where alert from

You can overwrite alert, and create an Error for the stack trace:

var old = alert;

alert = function() {
  console.log(new Error().stack);
  old.apply(window, arguments);
};

Leave a Comment

Vertical align radio in chrome

p {height:30px;line-height: 30px;}
p input[type=radio] {margin-top:-2px;vertical-align: middle}

Leave a Comment

Fighting the Space Between Inline Block Elements

nav a {
  display: inline-block;
  margin-right: -4px;
}

reference

Leave a Comment

Older Posts »