setup tomcat personal webserver - windows

i hosted an apache server by changing few details in the httpd.conf file, used this tutorial. i also did port forwarding so that the server is able to respond behind the wireless router (firewall), it worked completely fine ( i checked by typing the ip and port number from some other host outside the network). now i am trying to run servlets for which i need tomcat server. i have installed tomcat but i am unable to access the server from another host that is not on the same network. could somebody please guide as to how can i achieve this.

I guess I would go with The Apache-Tomcat Connector and use it to connect your new tomcat instance to your Apache.

I did the same thing just as I for apache server, except that I changed the listening port to something else. added that entry in the router. incorporated tomcat in eclipse and then started the sample project. using whatismyip.com, i got the ip address. i could access my webserver from elsewhere...

Related

Laravel Homestead needs to access local web server

I have the following setup in my DEV environment which is running on Windows 10 (which should be irrelevant).
Homestead with Virtual box to develop my Laravel applications
on my local OS I have a IBM Domino server running as dev1.mydomain.local
I'm trying to access the REST API on the Domino server from my Laravel installations. At the moment I'm getting 404 errors when trying because the domino server is not available from within the VirtualBox of Homestead.
Here is the network configuration of the homestead virtual box
Both webservers Domino and nginx on the virtual box are running on standard ports
Here is the ifconfig output of the virtual box
How can I make that possible?
UPDATE:
It just came to me that I am able to access the Domino server with LDAP, so perhaps changing the http and https port of the Domino server is already the answer...
I will test that and then get back here...
Changing the Port of the Domino server to 8080 enable me to access the server's REST API
dev1.mydomain.local:8080/api/data/
The connection to the local machine seems to be enable through the VirtualBox's second network adapter and the my call to the REST API got confused with the 2 web servers listening to the same port on localhost(127.0.0.1)
Update
although I was kind of able to connect to the server using the address above, still left me with the problem that authentication wasn't possible. In order to do so (and I have not the slightest idea why), I had to change to the local IP address of my PC to access the REST services
http://192.168.0.155:8080/api/data
If someone could explain that I would be happy :-)

How can I access a webpage located inside a VM from the host machine's browser?

I am able to access the link http://localhost/men/tops-men/jackets-men.html successfully from my VM (configured using X2Go client).
IP Address of the VM: 10.146.106.204
I am also able to ping the VM successfully from my host machine (Windows).
The page that I am trying to access is a php page deployed on Apache Web Server.
However I am not able to do so from my Windows host machine.
I tried http://10.146.106.204/men/tops-men/jackets-men.html from my Windows machine but it did not work.
Do I have to configure something on my host machine or on my VM ?
Not sure what I am missing.
On VM check you can view http://10.146.106.204/men/tops-men/jackets-men.html
If not you need to configure the web server to listen on that IP (if you're running IIS this is under "bindings" in the right-hand side panel of IIS Manager).
On Host open a cmd window and check you can ping 10.146.106.204
If not check your firewall settings on the VM.
If neither of these 2 things help then you need to add more information about your setup to the question. Those are 2 very simple things you can do to diagnose 2 basic problems you might be having.
I was finally able to solve the problem based on this SO link: Unable to access magento site from anywhere but localhost
Updated the DB table core_config_data and updated the data by replacing http://localhost with http://ip-of-vm and then restarted the apache web server.

Wowza Server Configuration On Amazon EC2 Server

I am struggling to configure the Wowza Media Server on Amazon Server.
Success: - I have Successfully Installed Wowza Server on Amazon and Streaming is working with the Internal Private IP. Now, I have changed the Port from Default 1935 to Port 80. Now Binding with port 80 with Internal Private IP is working Fine i.e. 10.8..:80 this works fine.
Problem: - Now, When I configure port 80 instead of my private 10.8.. to my Public IP 54.76..
binding fails and i got error Bind Failed and Could not assign port. I have tried all the solution posted on stack overflow and also reinstalled the application several times.
Solution Tried : -
1) Restarting the Amazon and Wowza Server.
2) To verify firewall, I have installed IIS server and hosted dummy application it works with both private and public IP on port 80.
3) Installed Correct Java Version i.e. 1.8
4) Stopped the IIS server and Running Wowza Server.
Help is appreciated. Thanks in Advance.
Ensure you modify the security group settings and that all the appropriate ports are defined there. I would also test playback with the aws url they provide to ensure it isn't an odd routing issue. Lastly, you can review the quick-start guide for this process to ensure all basis are covered.
Lastly there are a ton of pre-built AMI's just for this purpose as well.

How to get WAR file deployed online?

This might sound like a stupid question, but I have searched about it and couldn't find a clear answer, so I'm asking it here.
How do I get the WAR file online so I can access it from anywhere? I have a REST server in a war and I want to use it in an Android app so I need access to it from anywhere. Do I need a VPS? Can I host a VPS myself? I have searched about it but for some reason I can't find a clear instruction on how to do this.
Okay, here is what you need to do.
First of all, you will have to download and run a web server on your computer. I use tomcat6 or tomcat7. On Linux, "sudo apt-get install tomcat7". Then, "service tomcat7 start" in order to start the server, and "service tomcat7 stop" the server.
On your router (that faces the internet), you will have to port forward (not safe!) all the traffic from 8080 or 80 (whatever port your rest server is at), to go to the computer that is hosting the rest server. For a typical Linksys router, that means you have to log on to 192.168.1.1, and adjust the port settings. So, get the local IP address of your computer (usually IPV4), and forward all the traffic on port 8080 (on the external facing router) to go to this local IP address.
Now, copy the war to the webserver (for tomcat7, /var/lib/tomcat7/webapps.) Before you copy the war to this directory, be sure to COMPLETELY remove any old .war applications or folders with the same name.
Then, restart the server. You should be able to access the server using the external IP address of your router as the IP address. The external IP address will be listed on your router's homepage. Your external IP address will change over time-- if you want a static IP address, it would probably be best to find a commercial host or to purchase a static IP address from your ISP.

Red5 Problem with connecting from remote client

So I have this issue. The issue is I am unable to connect to my red5 server from a remote client. I also have not found any tutorials on how to install red5 so that remote clients can connect to it. However, here is what I have done...
Inside My MXML Flex File I try to connect to the computers IP that the server is running on(My Server is running from within Eclipse). The line for connecting looks like this netConnection.connect(rtmp://192.168.2.12/myApp, true);
All that happens is after a lot of minutes go by, I just get NetConnection.Connect.Failed and there is no log being output by Eclipse. Almost like it never even registers the connection that the remote client is trying to make.
The other interesting thing is that I am ABLE to connect to my Red5 Server using a different computer within my local home network just fine. But only when it is remote I am unable to connect.
I have changed my Red5-web.properties file and added this...
webapp.contextPath=/myApp
webapp.virtualHosts=*, 127.0.0.1, localhost, 192.168.2.14, 174.122.104.3
The 174 one is my website where the Flex Swf Resides on.
I think maybe somehow my computer is not setup or configured to allow these remote connections and is rejecting them or something, I'm not quite sure why a remote client can't connect. Does anyone have any idas?
Your help is greatly appreciated.
You may uninstall the red5 and reinstall it.
When it ask you the server ip address type your server's LAN adress (192.168.2.* or 10.0.0.* whatever). This solved my problem.
In my opinion, if you have at least one domain name that you own, the best way for you to go is to set up an Apache Http Server to your server machine, and create subdomains for both red5, rtmp and rtmpt. Make the Apache handle your incoming requests, and decide their correct routing there.
In case you don't own a domain, or the previous way is too time-taking to set up and get it work, you should just make sure that the ip address you're trying to connect to is not an internal IP.
In your example above you are trying to connect from the client to a 192.168... address. If you try to connect to it from within your LAN, it works, since that ip there is registered to your machine.
But when you take your notebook to your neighbor, and using his internet connection to access your site and connect to red5, the client (flex application) will also try to connect to that 192.168..., and your neighbor's router has no idea about your LAN, probably it doesn't have such an internal IP address either, but SURELY cannot connect to your server.
So instead of using 192.168... in your connection string, you should try using your external IP address (the 174... one):
netConnection.connect("rtmp://174.122.104.3/myApp", true);
This will work always, as far as you have a static IP address.
Also make sure, that your red5 server is accessible over the 80 port, or if it's not, specify the correct port number there.
For that you can do following thing...
These steps I took and it's solved my problem...
1.During the installation, you must have given ip 127.0.0.1 (localhost) and port :5080
2.firstly open the port (5080 and 1935) on firewall.
Visit http://windows.microsoft.com/en-in/windows/open-port-windows-firewall#1TC=windows-7
3.Now to go red5->conf->red5.properties and open this file in notepad++. (or any other editor)
4.repalce http.host and rtmp.host ip with your ip address (ipv4)
5.start the red5 service.
6.Now check http://yourip:5080
It will start working, and you can access it from other system also (in the same network Obviously )

Resources