 |
 |
External Access - resolves as localhost?
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Mar 2005
Status:
Offline
|
|
i am trying to setup a Wiki/webserver on my home iMac that i can access externally. everything works fine locally.
1: setup webserver (apache).
2: set sharing/internet/firewall etc... options
3: get external IP address via "whatismyip.com"
4: can remotely access the apache homepage. e.g. http://myip shows the default apache home page.
5: when accessing wiki ( http://myip/wiki/index.php) it comes back with "can't find http://localhost.local/wiki/index.php".
?? why is it replacing my IP (64.229.176.137 as of today, 24 march 2005) with localhost.local in the browser's window....
- i've noticed some sort of "local machine name" in the system preferences that is set to "localhost.local" but i don't know if this is the problem and if so, why it is being used.
- why does the apache page work but not the Wiki...is this apache directory accesss/configuration problem? related to the PHP module requ'd by Wiki?
i am new to mac just in case you haven't noticed.
any help appreciated.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Mar 2005
Status:
Offline
|
|
further note:
i can't ping my address from a remote machine but i'm assuming that's because by default, all pings are blocked -- even if you start apache (or web sharing or whatever it's called).
if this is the case, how do i set this on the mac to allow for pings.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status:
Offline
|
|
Ok, you actually have a few problems going:
The first is that you are calling your computer localhost... Go into System Preferences->Sharing and change the name of your computer to something better. This will not affect anything else, and is not a real solution to your problem... but is a good idea anyways. 'localhost' is a reserved word.
Second... if you can't ping from the outside, then you have a firewall or router (probably NAT) between you and the outside world. You have to make sure that you can get to port 80 on your computer from the outside world. Since we can't see your setup, you will have to take care of this yourself.
The third point is that you have to get into the /etc/httpd/httpd.conf file (requires authentication) and change the "ServerName" directive to the proper value. This can be your IP address if needed. Notice that this method does not differentiate between local and remote users, so you can knock yourself off if you are not careful. The best is to use a DNS entry with appropriate values both locally and remotely... but that is beyond the scope here.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Mar 2005
Status:
Offline
|
|
Originally posted by larkost:
Ok, you actually have a few problems going:
The first is that you are calling your computer localhost... Go into System Preferences->Sharing and change the name of your computer to something better. This will not affect anything else, and is not a real solution to your problem... but is a good idea anyways. 'localhost' is a reserved word.
> yeah, i actually had that before but changed it back.
Second... if you can't ping from the outside, then you have a firewall or router (probably NAT) between you and the outside world. You have to make sure that you can get to port 80 on your computer from the outside world. Since we can't see your setup, you will have to take care of this yourself.
> i thought turning on sharing would open up port 80? i can see it via http but just not ping (ICMP or whatever protocol that is).
The third point is that you have to get into the /etc/httpd/httpd.conf file (requires authentication) and change the "ServerName" directive to the proper value. This can be your IP address if needed. Notice that this method does not differentiate between local and remote users, so you can knock yourself off if you are not careful. The best is to use a DNS entry with appropriate values both locally and remotely... but that is beyond the scope here.
> not quite sure : what if my IP address is dynamic? so you're suggesting i add something like "www.myserver.com" to my hosts file. i'm also still confused why it let me see apache home page but not Wiki page below - thought it would fail for both if couldn't resolve address properly.
thanks very much for your help.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Mar 2005
Status:
Offline
|
|
follow up:
changing the ServerName as you mentioned fixed my problem.
i have it hard coded to my exterenal IP and will later do something more elegant (my ip isn't static).
thanks again for the help.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |