Jump to content

Localhost on the web?


Recommended Posts

Actually... I know the answer if the question is what I think it is... it is just rather poorly formed and does not directly express what you are asking ;)

 

For instance... "How do I expose my local web server to the public"

 

Your question effectively asks "How do I make a web server a web server"

Link to comment
Share on other sites

Yer, i have accessed my router and (i think) made it port forward, as it only has certain modes and HTTP WebServer is one, and to test i put in my ip and it came up with 404, but before i turned this mode on it came up with my router cp

 

I tried a few things like adding

http://ipnumber/www/test/test.php

or

http://ipnumber/test/test.php

 

and all were 404 errors

btw i am using a bt home hub

 

Any ideas?

Link to comment
Share on other sites

Yes i have tried just http://ip

and my local one

they both give page load error

Failed to Connect  

The connection was refused when attempting to contact 192.168.1.2.

Though the site seems valid, the browser was unable to establish a connection.

Failed to Connect

The connection was refused when attempting to contact 86.143.97.45.

Though the site seems valid, the browser was unable to establish a connection.

Link to comment
Share on other sites

It sounds like the router is not configured properly to pass the request.

 

All port forwarding is doing is listening for any requests to come into the router looking for a web page, then it "forwards" the request to the proper machine.

 

So, if my external ip(given by the isp) is 12.216.200.100, that is the IP address of the router and the one you would need to use to connect to the server. You can find your external IP within your router configuration settings, not with ipconfig (ipconfig will only show you the internal IP... probably something like 192.168.0.100) The internal IP is where you want to forward the request.

 

So, long story short... you are saying to the router "When someone tries to access the web server at IP 12.216.200.100, send the request to the web server on 192.168.0.100"

 

You just need to figure out which point in there the request is getting lost.

 

As a side note, you may also want to confirm that Windows firewall is not blocking the request as that has been known to happen :)

 

Good luck!

Link to comment
Share on other sites

It's working now, but a problem. When i type in my IP or give it out to people to type in, it takes them to my WAMP server config page, and this means they can access anything on there e.g. phpMyAdmin.

 

How do i stop this , either password protect the pages, or forward the ip requests to my homepage?

Link to comment
Share on other sites

you should have an /alias directory

with a file called phpmyadmin.conf in it already

 

if you don't then make one and put this in it

Alias /phpmyadmin "c:/wamp/apps/phpmyadmin2.11.6/" 

# to give access to phpmyadmin from outside 
# replace the lines
#
#        Order Deny,Allow
#	Deny from all
#	Allow from 127.0.0.1
#
# by
#
#        Order Allow,Deny 
#   Allow from all
#


    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
        Order Deny,Allow
Deny from all
Allow from 127.0.0.1

Make all the necessary changes first of course

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.