hosting tomcat on mac os - macos

I'm using mini mac and tomcat 7.0.29,
I want to host it from my computer so other computer outside the network could connect to it.
I have set the port forwarding into 80 both start and end.
set static IP on my mini mac.
however, after getting the router IP address from ip2location.com and access to it from external computer,it display "it works!" screen, not the tomcat home page. this page is also displayed when I use localhost instead localhost:8080. Here is some snap shot that I've taken from both computer
http://i182.photobucket.com/albums/x38/DNK90/staticIP.jpg
http://i182.photobucket.com/albums/x38/DNK90/portforwarding.jpg
And this one is from external computer
i182.photobucket.com/albums/x38/DNK90/tomcat.jpg
anybody who know how to access directly to the localhost:8080 through router IP, tell me ^^

Well the problem is, that on port 80 the apache is being called for an answer. You will have to configure your NAT a bit different. Either you find an option on your router to forward every call to port 80 to port 8080 on your mac mini or you use ipfw (on linux machines you would use iptables). Try
sudo ipfw add fwd 127.0.0.1,80 tcp from me to 127.0.0.1 dst-port 8080
I do not have a mac in front of me right now, so this command is untested, but I think it will work.
Ps. Once I get home, I'll test the command and edit this post.

Related

remote connect to xampp website(v3.2.2)

I try to connect to my computer xampp website from other computer.
I got my IV4 IP, it works from local but not work from other computer.
my xampp version is v3.2.2
seems like there's no version available right now.
how can I set for it?
thanks for looking.
on the LAN line, most routers allow any connections between peers, but I think you're trying to connect from outside that WiFi/router, yes?
If so, you need to get the public IP of the host computer running xampp (Google 'what is my ip'), then you'll need to port forward your local ip (192.168.1. something) and the port of xampp by going into your router settings. Port forwarding basically tells your router that outside connections should be allowed if they're using that IP and port. You'll then use the public IP and port in your browser from any device to see the website.

Xampp port not working

I've got xampp installed on ubuntu. The port which I'm using is 3000. Let's say that my IP address is 123.123.123.123
When from another device I'm checking port 3000 for page 123.123.123.123 it's saying it is open.
When I'm opening page 123.123.123.123:3000 on my computer it's working. However when I'm opening 123.123.123.123:3000 on another device it's not working.
How is it possible? (The port is open)
*it looks like client is being redirected to localhost.
Let's say you are running Xampp server (apache) on port 8000. In this case, your local server access address would be localhost:8000/ or 127.0.0.1:8000/
Let us consider your ip address to be 123.123.123.12. So in your LAN network, the server access address would be 123.123.123.12:8000/. So the address you have used will work in case of devices connected in a LAN network.

How do I set up my computer to serve website using web2py?

I've got web2py working so I can access my webapp from my computer locally. I also have tornado working and listening on port 8080 as I want to use websockets.
I've chosen the "Public (0.0.0.0)" option when firing up the server and listening on port 8000.
I've set up port forwarding on my router from port 80 to port 8000 using the "other" function of the guide p.58.
When typing "what is my ip" it seems to be an IPv6 IP so no idea if that matters but I tried to check if I've done it correctly by going to this site http://www.ipv6proxy.net/index.php and trying to navigate to my IP address that google spit out when I typed "what is my ip?" but get a couldn't connect to the host message.
Any idea what I'm doing wrong?
I'm relatively new to this.
To explain motivation I simply want to do a dry run of the website and websockets online. I think there are a tonne of security risks associated with what I'm doing and this is simply a learning exercise for me and do not intend to host the website this way. I do want to understand how I would do this though.
EDIT
I'm running ubuntu 14.04 LTS

Can't access my localhost via internet

forward port 80 TCP/UDP on router (OPENED)
port 80 TCP/UDP on firewall (OPENED)
httpd.conf - httpd-xampp.conf (EDITED)
But when I try visiting by my ip I get nothing on browser,
its working on LAN and WLAN not on internet
What I should to do?
there better way to make PC as webserver?
which is best OS for server?
Some ISPs won't allow port 80 to be connected to from outside your home network as an attempt to block people from hosting a website from their home network. Try setting your server to listen on a different port (85 is generally not in use) and you should be able to connect to it.
As for your other question, in my opinion, Ubuntu (or any flavor of Linux) is a good OS for a web server. Ubuntu is free and easy to use and there are plenty of resources online if you have any problems.

localhost host not working on XAMPP

I am facing same problem to the thread. I've gone through all the suggestions provided in the solution. I've searched all possible solution but nothing gonna workout.
"http://stackoverflow.com/questions/817745/localhost-not-working-on-xampp-both-service-apache-mysql-are-fine"
I've ensured :
1. Xampp is successfully started (in log) but it is not receiving any request(checked access.log).
also ensured that it is running on port 80 in config file.
confirmed status of application using netstat
C:\Documents and Settings\user>netstat -aon | grep 80
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 3524
Checked host file in /windows/system32/drivers/etc/hosts and has only one entry
127.0.0.1 localhost
skype teamviewer or other application are closed and configured not to use port 80.
ensured that windows firewall allows http process to use port 80.
pinged localhost, 127.0.0.1 and my ip (192.168.1.2). localhost resolves to 127.0.0.1
tried different urls http:// localhost http:// localhost:80 http:// 127.0.0.1 http:// laptop-name but nothing works. browser just waits for response (spaces after http to allow links in this post)
ensured that there is no loop in index.php(it is untouched) and also has index.html. also tried diffent paths
nothing gonnna work out. I am irritated and I dont want to format my machine. please help....
when this happens to me it is usually Skype taking over the default localhost address
Check on command prompt
netstat -a -b
And close any other application like skype etc using 80 port.
Try stopping IIS. It worked for me.
Select Start, then type IIS in the search box
select Internet Information Services Manager
In the manager on the right under "Manage server"select "stop"
I was having an issue with Last.fm that is very similar to yours, and I found that it was a software conflict.
The Last FM scrobbler application would not finish installing on my new build because it couldn't login or authenticate my username. I tried the regular scrobbler application and then tried the beta desktop program on Windows 7 64 bit. I suspected Skype or TeamViewer, but even after stopping or exiting those programs, neither versions of the installation would log in to the services.
The beta desktop application actually authenticated on 127.0.0.1 (random port) through my internet browser, but my browser would time out trying to send data over the port.
I checked and edited my HOSTS file in Windows, but that didn't fix the issue either.
Pinging 127.0.0.1 worked, but pinging any variation of the port would time out.
Finally, I decided to uninstall the Windows 7 Firewall Control program made by Sphinx Software. Mind you, I had set the firewall to be disabled at start up (clean start-up - all startup programs disabled through MSConfig).
I made sure that the firewall program was not running at all in my services. However, after uninstalling the software, even without restarting my computer, 127.0.0.1 opened up on all ports and my Last.fm scrobbler finally connected and finished installation.
So, it may be a hidden setting that can only be undone by uninstalling programs (even programs that aren't running).
For me localhost was not the correct address.
Type into cmd "hostname" and use that as the url.
CMD -> hostname
If that doesn't work try just the ip address of the server (or computer)
I stored my website folder in xamp/htdocs (windows machine). Then I started apache on the XAMP control panel. My pages rendered successfully when I called http://localhost/mysite/index.html.
I hope this is helpful.

Resources