up vote 0 down vote favorite
1
share [g+] share [fb]

I'm using Apache Tomcat to locally host the web sites am designing but i want my friend to be able to access this web page from his home.

How can I make my laptop a server for my pages so that it can be viewed remotley using apache tomcat?

link|improve this question
2  
This is crying to be migrated to Serverfault. – Moayad Mardini Sep 27 '09 at 12:07
@Moayad: I see your point, but in this instance it's useful information for teleworkers that do web development. It'd make my life easier if other people knew about SSH tunnelling and the like... – ijw Sep 27 '09 at 12:13
It would help a lot if you told us how you connect to the Internet... – Zed Sep 27 '09 at 12:17
can you change title to: "Making my laptop a web server". – Robert Koritnik Sep 27 '09 at 22:14
feedback

migrated from stackoverflow.com Sep 27 '09 at 17:17

This question came from our site for professional and enthusiast programmers.

2 Answers

If you're only rarely running the web server and it's not for production purposes, then simply port-forwarding to your laptop is a safe bet. Just forward port 80 on to your laptop MAC address and set it to have a fixed IP address from your router's admin panel.

Once you've done this, you can either give your friend your internet facing IP, or use a domain to point at your dynamic IP, e.g. No-IP.

link|improve this answer
How do you know he has a router? – Zed Sep 27 '09 at 12:26
he didnt say he know he has a router (: – user20294 Sep 27 '09 at 12:32
Most cable and DSL modems offer port forwarding also. – cop1152 Sep 27 '09 at 18:27
feedback

Without knowing some specifics, it's a bit of a "fishing expedition" at this point. What operating system do you have, are you using a firewall or router, are you running any security software, etc.

If you are using a router / firewall then you need to make sure this device has port 80 opened and also forwarding to your local IP address.

If you are on a Mac, make sure you have enabled Web Sharing in System Preferences > Sharing. You will also see your computers IP at this point, however, that's your local IP.

If you are on Windows, make sure Windows Firewall is not blocking port 80.

Your friend will need to go to your public IP which can be determined at WhatIsMyIP.com rather than your local IP address (usually 192.168*, 10.0.*, etc).

link|improve this answer
And it also depends whether your provider gave you static or dynmic IP. In case it's static, your friend would be able to get to you via same address, otherwise you can setup dyndns record. – Robert Koritnik Sep 27 '09 at 22:13
feedback

Your Answer

 
or
required, but never shown