Mac Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsMac Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 30th, 2005, 04:38 PM
CodyM CodyM is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Location: Vancouver, Washington
Posts: 77 CodyM User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 h 28 sec
Reputation Power: 0
Send a message via AIM to CodyM Send a message via MSN to CodyM
Is it OS X or Apache? What do I do?

Well I set up Apache, MySQL, and PHP on my Mac running OS 10.3.9, and everything was running fine for a while, but then for some reason whenever I try to access my site it redirects to http://cody-moncurs-computer.local, so no one outside of my network can access my site anymore. I don't know what to do about it. I even tried reinstalling OS X and reconfiguring Apache again. What is going on?

Reply With Quote
  #2  
Old June 30th, 2005, 05:48 PM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,536 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 18 h 2 m 16 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
I've since moved in to Tiger but I remember noticing this before I switched, of course since I only use Apache on my Mac for testing things locally I never had any problems.

Whenever I wanted to show someone anything on my local server I would go to the System Preferences and click Sharing then (enable Personal Web Sharing if it isn't already on) at the bottom of the window you will see a set of URLs for accessing your server from the outside world .

All in all I don’t think the redirection should cause any problems. You should still be able to access the server using the IP address of the computer/network. Providing the appropriate ports have been opened in the firewall .

Give this a go and let me know how it goes. I hope this helps,

Mark.
__________________
programming language development: www.netytan.com Hula


Reply With Quote
  #3  
Old June 30th, 2005, 07:14 PM
CodyM CodyM is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Location: Vancouver, Washington
Posts: 77 CodyM User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 h 28 sec
Reputation Power: 0
Send a message via AIM to CodyM Send a message via MSN to CodyM
Well the thing is whenever I type in my IP, 67.170.144.123/~Cody, doing that redirects me to cody-moncurs-computer.local, and no one except me can see the site.

Reply With Quote
  #4  
Old July 1st, 2005, 04:38 AM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
Quote:
Originally Posted by CodyM
Well the thing is whenever I type in my IP, 67.170.144.123/~Cody, doing that redirects me to cody-moncurs-computer.local, and no one except me can see the site.

Ah. I was already wondering...

You are using a wrong URL. Correct is "67.170.144.123/~Cody/".

Apache is redirecting you to the correct one, but "UseCanonicalName" seems to be On (which shouldn't) and thus it is making up the name instead of using the IP address again.

[edit]
Just checked my 10.3, UseCanonicalName is actually "On" by default.
Netytan, can you check if it's "Off" in Tiger? Just being curious...

HTH,
M.
__________________
--
Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more.

Last edited by M.Hirsch : July 1st, 2005 at 04:40 AM.

Reply With Quote
  #5  
Old July 1st, 2005, 09:02 AM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,536 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 18 h 2 m 16 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
Hi guys,

Yes M.H the option is still enabled by default in Tiger as shown in the caption below.

Code:
#
# UseCanonicalName:  (new for 1.3)  With this setting turned on, whenever
# Apache needs to construct a self-referencing URL (a URL that refers back
# to the server the response is coming from) it will use ServerName and
# Port to form a "canonical" name.  With this setting off, Apache will
# use the hostname:port that the client supplied, when possible.  This
# also affects SERVER_NAME and SERVER_PORT in CGI scripts.
#
UseCanonicalName On


Now I'm no expert when Apache but surely this means that the option will only take effect when the user references to his own server? Also, just being curious but I don't see how this option should effect the servers ability to see the server from the outside.

In any case turning this option off should stop redirection, problem solved .

Take care,

Mark.

Reply With Quote
  #6  
Old July 1st, 2005, 10:36 AM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
Quote:
Originally Posted by netytan
Now I'm no expert when Apache but surely this means that the option will only take effect when the user references to his own server?

The option plays its role here in that Apache recognizes the missing trailing slash. So it tries to redirect the client to the correct URL.
(On a sidenote, this behaviour can be switched on/off too (see DirectorySlash)

But the new URL is wrong, if "UseCanonicalName" is "On".
Unless you know why to set it to "On", it should always be "Off". Hmmm. should I report this to Apple?

I wrote some explanations about UseCanonicalName here: forums.devshed.com

Quote:
Originally Posted by netytan
Also, just being curious but I don't see how this option should effect the servers ability to see the server from the outside.

The option itself doesn't. The problem here is that it is using the host's default name.
It can not be accessed from the outside because CodyM's DNS server doesn't know about it.

M.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsMac Help > Is it OS X or Apache? What do I do?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway