Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share

migration rejected from stackoverflow.com Jul 20 '13 at 22:36

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as off-topic by Iain, Bryan, Scott Pack, Falcon Momot, Magellan Jul 20 '13 at 22:36

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about hardware or software used in a home setting are off-topic because they require answers that may not be practical for the business and support professionals here. You should try asking on Super User instead." – Iain, Bryan, Scott Pack, Falcon Momot, Magellan
If this question can be reworded to fit the rules in the help center, please edit the question.

    
@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

2 Answers 2

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.

share
    
How do you know he has a router? –  Zed Sep 27 '09 at 12:26
    
he didnt say he know he has a router (: –  Jacob Sep 27 '09 at 12:32
    
Most cable and DSL modems offer port forwarding also. –  cop1152 Sep 27 '09 at 18:27

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).

share
    
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