|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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?
|
|
#2
|
||||
|
||||
|
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. |
|
#3
|
|||
|
|||
|
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.
|
|
#4
|
|||
|
|||
|
Quote:
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. |
|
#5
|
||||
|
||||
|
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. |
|
#6
|
||||
|
||||
|
Quote:
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:
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. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Mac Help > Is it OS X or Apache? What do I do? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|