Archive for Uncategorized

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




Leave a Comment

Phonegap IOS Project


  1. Follow the steps in
    When install Xcode, using “Apple Developer Downloads” link
  2. Add ExternalHosts in Resources/Cordova.plist if using external links: *;
    if use weinre, add one more: localhost
  3. Use weinre  to debug (testing on chrome)
    install Homebrew  in Terminal ruby <(curl -fsSkL refer to
    install node Nd npm from
    in Terminal:  sudo npm -g install weinre
    run weinre in Terminal: weinre,  it will start server localhost:8080
    add localhost in Cordova.plist
  4. Add Phonegap-SQLitePlugin
    Follow the steps in
  5. Copy project web source to folder www/
    if need weinre debug, uncommon out the line in index.html  <script src=”http://localhost:8080/target/target-script-min.js#mytest4″></script&gt;
  6. delete app in similar; in Xcode: cmd+shift+K – clear cache, cmd+shift+r build , click Run , cmd+shift+c display console
  7. Turn off debug (web only): util.js, change Tool.debug from true to false

Leave a Comment