port forwarding oddities

varese

Registered
Hi all,

I have a Linksys wrtg54 wireless router.

I have set it up to forward ports 22 and 81 to my Powerbook G4 (for ssh and httpd respectively).

I am using dynDNS so that 75nbway.homedns.org resolves to my dynamically assigned IP address from my ISP.

So, if you point your browser to http://75nbway.homedns.org:81 you'll see my apache test page (as long as my laptop is on and not sleeping!)

The problems begin if you point your browser to a directory underneath my root webdir:

http://75nbway.homedns.org:81/drupal for example.

If you point your browser there, the server tries to redirect you to souwest.local/drupal

(souwest is the hostname of my laptop)

see:

jfreeman@monica:/etc/httpd> lynx 75nbway.homedns.org:81/drupal

Looking up 75nbway.homedns.org first
Looking up 75nbway.homedns.org:81
Making HTTP connection to 75nbway.homedns.org:81
Sending HTTP request.
HTTP request sent; waiting for response.
HTTP/1.1 301 Moved Permanently
Data transfer complete
HTTP/1.1 301 Moved Permanently
Using http://souwest.local/drupal/
Looking up souwest.local
Unable to locate remote host souwest.local.
Alert!: Unable to connect to remote host.

lynx: Can't access startfile http://75nbway.homedns.org:81/drupal


Any ideas on where/how to fix this?

I'm thinking of editing /etc/hosts

Maybe that will fix it?

Cheers,

Joshua

jfreeman at gmail dot com
 
Actually, the real fix is to change the "ServerName" directive in the httpd.conf file. Restart apache.
 
Scott, btw, yes, adding the trailing slash made all the difference... but my friend in Mongolia is having trouble either way, so I'm editing httpd.conf... calling ServerName

75nbway.homedns.org

but that's prolly too much information. (for httpd.conf
 
You may want to add "75nbway.homedns.org" in your private /etc/hosts file as your local IP on your network... 192.168.1.5 or whatever yours is. /private/etc/hosts

Do a search on how to get that activated here on the forums.
 
Back
Top