The next step would be to associate an elastic IP with your EC2 instance and setup an Apache server:
- From your Amazon console, click elastic IPs and Allocate a new address.
- Associate it to your EC2 instance (if you don't associate with an instance, you'll be charged).
- Wherever you registered your domain name (Godaddy, Namecheap, etc), you're going to have to change the Address Record (A record) to point to your IP. e.g., for Namecheap, click "Manage domains", the "All host records", and enter your EC2 IP address for both the fields as shown below:
- You should be able to head over to your registered address (e.g., foo.com) on port 8080 now and see the tomcat manager.
- You might want to install Apache 2 (if you want, otherwise, you can just let Tomcat work as a web server instead of a servlet container; using Apache 2 as the server with Tomcat as the container would allow you to fiddle around with modules). In this example, we're going to be using mod_proxy to proxy requests to Tomcat. Apache listens on port 80 and Tomcat on port 8080.
- Installing and starting apache is simple:
- ssh into your instance
- type sudo yum -y install httpd
- type sudo /sbin/chkconfig httpd on
- type sudo /sbin/service httpd start
- /var/www/html/ is the root web directory; httpd.conf is located at /etc/httpd/conf; mod_proxy is located at /etc/httpd/modules
- note that after changing httpd.conf, you should restart apache using sudo /sbin/service httpd restart
- Before doing anything else, you need to modify your Amazon security group to open up port 80:
- on your Amazon console, click Security Groups
- check the box of your security group, click "Inbound", create a custom TCP rule for port 80 (port range would be 80) and add this rule
- Also, you might want to modify port 8080 to only accept requests from your instance for added security:
- on your Amazon console, click Security Groups
- check the box of your security group, click "Inbound", create a custom TCP rule for port 8080 (port range would be 8080) and under "Source", add your elastic IP e.g., some.ip.foo.bar/32
- if you were following Part 1 of this series, you should remove the old rule for port 8080, where the "Source" was 0.0.0.0/0
- Next, modify your httpd.conf file for any context path that you wish to forward to Tomcat. In this example, I'm forwarding / to http://foo.com:8080/myapp. Note that by default, mod_proxy is already configured properly in this file (otherwise, follow this link, modifying as appropriate):
ProxyPass / http://foo.com:8080/myapp ProxyPassReverse / http://foo.com:8080/myapp
- Also modify the Tomcat server.xml file:
- vim /etc/tomcat7/server.xml
- Make sure that you comment out existing lines which deal with port 8080 and instead add the following line:
<Connector port="8080" proxyName="www.foo.com" proxyPort="80"/>
- Restart your Tomcat and Apache, and you should be all set. Just type foo.com and you should be able to view your website.

hepsibahis Yüksek bahis oranları sunan en güncel canlı bahis şirketi olan hepsibahis firmasına buradan direk giriş yapın. Youwin adı ile tanınan ve Türkiye deki ismi hepsi bahis olarak kullanılan iddaa firması ile ilgili detaylı bilgileri öğrenin.
ReplyDeletemeal kits Making cooking a little easier. It's hard, it takes time and who's got the time after a long day of work, looking after kids and being on your feet all day ? I bet you don't and neither do I.. making cheap and tasty modern day meal kits the new normal among all the changes going on in our world today.
ReplyDeleteBUY SPOTIFY PLAYS REAL PLAYS TO BOOST YOUR MUSIC.
ReplyDeleteWe will promote your tracks and give you very good promotion Buy spotify plays
Faster way to fat loss
ReplyDeletexanax bar mg This dosage provides relief of anxiety for up to 6 hours after it has been ingested, which can help you focus on what needs to be done without being disrupted.
ReplyDeleteZPrávy
ReplyDeleteWhat is medical marijuana
ReplyDelete
ReplyDeleteHundepool
du doan XSMB
ReplyDeleteFacts about addiction Addiction stands as the top public health problem in America outstanding all other major diseases including stroke, heart diseases and even cancer. The population of addicts is far larger than the patients suffering from the three mentioned diseases in America with sufferers ranging in millions.
ReplyDeletepr čláNKY
ReplyDeleteAK-47 PISTOLS FOR SALE
ReplyDeleteFacebook Video Downloader
ReplyDeleteBritish blue cat Kittens for sale near me English shorthiarWe have been branded as the best cattery for breeding healthy kittens and puppies ready for a home.
ReplyDeletecanim sohbet Android Dear ChatCanım chat is growing day by day with the android chat service it has given to you and serves you, dear chat lovers, free of charge. You can connect and chat online at any time of the day with your smart devices on our chat site. Anonymous chat is a free chat site that allows you to chat randomly and does not charge any fee or money from our valued chat users.
ReplyDeleteIt is extremely nice to see the greatest details presented in an easy and understanding manner. Get Digital Marketing Services At Affordable Price At JeewanGarg.Com (SEO Company in Delhi)
ReplyDeleteAvail one of the widest ranges of Online UPS with cent percent efficiency with internal and external batteries. Buy NexusUPS as they provide customized designed solutions across the industry verticals to require varied and specific requirements. They provide the best Online UPS Price along with the on-time delivery to their prestigious clients.
ReplyDeleteSabyasachi - Buy sabyasachi online , Sabyasachi Sarees, Sharara Set & more online at panache haute couture. Shop from the latest Sabyasachi collection online now and give a dreamy start to your second inning of life. You will receive on-time delivery at your doorstep.
ReplyDeleteChanson water company Taiwan - the world leaders in manufacturing highest quality alkaline water machine since 1979.
ReplyDeleteQuality Spare Centre: Shot blasting process carried out to prevent metal fatigue or cracking as well as for cleaning and surface hardening.the role of the shot is to remove impurities, rust, scattered pieces of rubbish or remains that may affect metal strength.Shot Blasting is a procedure to clean, strengthen, or polish metal. Shot Blasting Machine is required for shot blasting in almost every industry that uses metal, including automotive, aerospace, foundry, construction, rail, shipbuilding, and many alike. Shot Blasting Technique is used for surface protection and prior-preparation surfaces to further processing such as welding, painting, etc. We at www.shotblasting.org offer world-class and efficient long-term solutions and complete service features for users of shot blasting technique. These also include new Shot Blasting Machines along with the customized solution. Our experienced team uses its impeccable expertise in the enhancement, design, manufacturing, and distribution of Shot Blasting Equipment.
ReplyDeleteSuch an interesting and essential topic that everyone should know this. Parsan is the best service provider of Mining Geophysics in India which provides the best services of mining geophysics service provider , mining geophysics surveys and mining geophysics services in India.
ReplyDeleteresidential property management
ReplyDeletebuy dank vapes
ReplyDeleteHow did things change so dramatically, even as California debates collecting sales tax from medical marijuana dispensaries and growing cooperatives? marijuana dispensary
ReplyDeletepolyuria As a worldwide leader in industrial coatings and spray-on truck bed liners, ArmorThane offers a full line of top-quality polyurethane and polyurea coatings and high-tech spraying equipment and supplies. Our professionally applied pure and hybrid polyurethane and polyurea formulas are extremely durable, flexible and safe.
ReplyDeleteDo you want office Space for rent in Dubai? Get Affordable Dubai Business Center With Spiderbc.
ReplyDeleteThank you for your valuable and useful information through the blog.
ReplyDeleteFurthermore, I would like to inform you about the Nuform - Best digital marketing company in Noida
If you like to grow your business online and enhance it to Next Level just visit our website and you will get complete Assistance .
social media marketing company in noida
Best seo company in noida
Great content.....keep it
ReplyDeleteOm International provides the service of packers and movers in Gurgaon
https://www.ominternationalpackers.com/
Dinstar UC2000-VF is a Dinstar 16 Port GSM Gateway in a compact field-proven hardware design, used to smoothly transit between mobile and VoIP networks, for transmission of both voice and SMS.
ReplyDelete