Apache trailing slash
here is my problem
if i go to myserver.com/directory/ it works if I try myserver.com/directory it gives me a connection refused error. I've read through some posts and read that aliases would fix it but I don't want to create an alias for every directory on here. Someone else mentioned the Options Directive but I'm unclear as to how that should be set up to automatically attach the slash at the end? Any help would be greatly appreciated. Thanks, The Boondock Saint |
Welcome to LinuxQuestions! :)
The simplest way of solving this is by specifying "UseCanonicalName On" in your Apache config file. This will automatically attach the slash and Apache will be happy. Works for both Apache 1.4 and 2.0, and you can specify it in any global section of the config file (not in the <Directory> parts, etc). Håkan |
"UseCanonicalName On" is already in the conf file. Any other suggestions?
|
argh .... don't tell that no one here has a clue as to how to fix it ????
|
i left my apache settings as default and dont have that problem so sadly i cant help much.
|
so did I :(
|
First off make sure that you're editing the correct file. If you have one instance of Apache2 installed with the distribution and one installed from source you're likely to be editing the wrong file (and believe me, we've had those problems here :)).
Håkan |
Well I have httpd.conf and httpd2.conf the global settings you mentioned are in commonhttpd.conf
I'm not using virtual hosts and all settings are the default settings. Is there another way I could do this like having a .htaccess file in the server root that takes the request for "directory" and forwards it to "directory/" This is driving me mad. |
ok I just noticed that if you type dogicdesign.com//myspace
(two slashes) then it auto attaches the slash at the end and loads fine. any clues ??? |
Re: Apache trailing slash
Got it! At least, for VirtualHost's. First, your ServerName should be set in your global httpd.conf. As in: Second, each VirtualHost must have a ServerName specified. For example, here's my settings: Code:
<VirtualHost 123.456.789.100> |
All times are GMT -5. The time now is 05:12 AM. |