Saturday, March 9, 2013

Resolving to port 80 instead of 8080 (AWS, Linux, Tomcat)

Launch AWS EC2 instance with Linux, securely connect to it

>yum -y install tomcat7
....
Compile and deploy your webapp / mobile app
Let's make it simple - for example, deploy helloworld.jsp
....

>service tomcat7 status
tomcat7 (pid  <...>) is running...
 ....


Go to  web browser / g.g. Google Chrome

http://<IP address or domain name>/helloworld.jsp
For example
http://hastasiempre-ismyfavourite.com
Oops! Google Chrome could not connect to <...> 
Darn! I mean, WTF?
Browse some forums. Figure that default port for Tomcat7 to listen on is 8080.
http://<IP address or domain name>:8080/helloworld.jsp

Hell of a world!

Go to .../tomcat7/conf. Edit server.xml with your editor of choice to change ports 8080 and 8443 to 80 and 443 respectively. 
http://<IP address or domain name>/helloworld.jsp

Oops! Google Chrome could not connect to <...> 
Browse even more forums. Figure out that you need to run tomcat as root to be allowed to use port under 1024. Edit tomcat7.conf with your editor of choice to change TOMCAT_USER="tomcat" to TOMCAT_USER="root".
http://<IP address or domain name>/helloworld.jsp

Hell of a world!

Bingo!

My humble contribution in the form  of sed script to switch from port 8080 to 80:

#!/bin/bash 
tomcat=tomcat7
tomcat_conf=/usr/share/$tomcat/conf
 cd $tomcat_conf 
sed -e 's/="8080/="80/g' -e 's/="8443/="443/g' -i $tomcat_conf/server.xml
sed '/Connector port="80"/i\<!-- change user tomcat to root in tomcat7.conf, change ports 8080 and 8443 to 80 and 443 respectively -->/' -i $tomcat_conf/server.xml
sed -e '/TOMCAT_USER=/i\# Switch user from tomcat to root'  -e 's/TOMCAT_USER="tomcat"/TOMCAT_USER="root"/' -e 's/="8080/="80/' -i $tomcat_conf/$tomcat.conf

Monday, December 24, 2012

Fossil hand bags

Owned a Fossil watch once.
But my real obsession are Fossil handbags.

Something of along these lines - Vintage Revival Handbags


Oh wait. I own this one. It's practical and perfectly all right. Not much to talk about. I meant something like this
Material: Leather
Interior Material: Jacquard - 100% Polyester
(well, silk lining would've been more classy)
Closure: Turnlock
Interior Details: 2 Media pockets, back wall zipper pocket
Measurements: 15"L x 4"W x 7.25"H
Handles / Straps: Single handle
Drop: 6" L


A strapless purse. Not practical at all. To be used on rare occasion of going to the theatre show with escort. What if I find it under the tree?

Sunday, November 25, 2012

Holiday baking rage came to an end. My mixer fell apart. 

Back to healthy diet of watery soups.

Monday, November 19, 2012

Holiday season is 'round the corner...

And how do I know?


I went to the mall and saw Tesla installed right in the middle of it. Well, in a separate TESLA salon. But this has nothing to do with the holidays. You can't exactly buy this shining miracle. Not for XMas. You can reserve one for 5K.

So back to holidays agenda. It's all about giving. And giving means buying.  Got a new baby in the family? Right in time. You can purchase Ralph Lauren  Convertible Shearling Bunting  for just $950. 
And while we are still on Ralph Lauren brand -  treat yourself to


Jesrina Suede-Gold Heel Sandal @Price: $1400.00
If you can't afford the baby envelope, I suggest to skip baby winter item 
in favour of shoes - adult sandals make much more sense given the climate change.  
 
  
On a serious note, Ralth Lauren offers 
tons of great reasonably priced quality clothes on sale. 
Enjoy your shopping season! 
Enzo Angiolini Arynn Riding Boot - Bordeaux





Wednesday, September 5, 2012

Savoury galettes

I am talking about thin blintzes with buckwheat. They say crêpes are made with no yeast, but crêpes is the best way to describe this dish.

My galettes are made by pouring a thin liquid batter onto a hot frying pan and tilting the pan to embrace as much of cooking surface as possible. 

My version is lactose-free, dairy free and therefore vegan. When I try it with milk or sour milk or yoghurt I'll tell you all about it. But for now let's stick to the recipe that worked for me.

2 1/2 glasses of warm water, 3 eggs, 6 rounded tablespoons of buckwheat flour, 8 rounded tablespoons of of wheat flour, a teaspoon of yeast, a teaspoon of salt (flat), a rounded teaspoon of sugar... Mix all the ingredients well with a wooden spatula. Let it stand for 20-30 minutes. Add some water to make the batter perfectly liquid. Meanwhile heat your favourite crepe pan, grease it with oil. I use grape-seed oil  and I dip half or an apple or potato into to it to then create a thin oil film on the hot surface. I use ladle to pour batter onto the pan and then tilt the pan to spread the batter evenly. I flip crepe once it produced myriads of tiny holes and thickened.

Warning: these  are not gluten free. I experimented with proportions of buckwheat and wheat flour and 3:4 ratio worked best for me.


Now you can add anything you like to your crepe, roll it or fold it as an envelope. You may simply put some sour cream and chopped strawberries and roll it. You may stuff the envelope with ground beef or farmer's cheese and lightly fry it. Possibilities are endless.