Hi, folks! This does not apply towards our server, but for anyone out there who is configuring a Mac OS X apache web server and gets Apple Rendezvous names in the URL when you leave off the trailing slash, here is the quick and easy fix if you have a registered domain name...
EXAMPLE:
Assume your web server is serving and works with a trailing slash...
. WORKS:
http://myserver.mycompany.com/foldername/. YOU TRY:
http://myserver.mycompany.com/foldername. YOU GET:
http://stevejobs-computer.local/foldername/Sometimes, I think if you try to ask for a URL without a trailing slash, Apache fails on the initial request because its looking for an extensionless document. Apache then tries again (redirects) but looks for a directory the second time (by adding a slash); however, it does not just add a slash to the end of the original request. What it does is use its own defined name in the httpd.conf file to refer to itself, and if no name is set in the httpd.conf, it puts the Apple Rendezvous name in its place. That's why you get a funky URL with something like funky-name.local.
To fix this, you have to modify the apache configuration file and define your servername, if you have a registered DNS name...
1. sudo pico /etc/httpd/httpd.conf (you may want to back it up first)
2. use pico/nano's search (^w) to find where it defines ServerName
3. uncomment line and put Servername yourserver.yourcompany.com
4. exit and save file
5. restart your computer (you might be able to use apachectl but I had to do full reboot)
The configuration text above should look something like this...
# ServerName allows you to set a host name which is sent back to clients for
# your server if it's different than the one the program would get (i.e., use
# "www" instead of the host's real name).
#
# Note: You cannot just invent host names and hope they work. The name you
# define here must be a valid DNS name for your host. If you don't understand
# this, ask your network administrator.
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address (e.g.,
http://123.45.67.89/)
# anyway, and this will make redirections work in a sensible way.
#
# 127.0.0.1 is the TCP/IP local loop-back address, often named localhost. Your
# machine always knows itself by this address. If you use Apache strictly for
# local testing and development, you may use 127.0.0.1 as the server name.
#
#ServerName new.host.name
So, just uncomment the above line and change it accordingly...
ServerName myserver.mycompany.com
Everytime I configure a new web server, I try to do this, add index.php as valid default page, and deny directory listings (change Indexes to -Indexes where the httpd.conf has 'Options Indexes').
--ST