traliing slash in URL path configuration

Karl DeBisschop karl at debisschop.net
Tue Mar 2 03:46:29 CET 2004


On Tue, 2 Mar 2004 12:00:41 +1100
"Yao, Jack" <jyao at aav.com.au> wrote:

> Hi all , 
>  
> sorry that I have to keep asking the same question again. Basically ,
> on Redhat 8.0 and Apache, I 've been trying to change the default URL
> from http://mydomain.com/nagios/ <http://mydomain.com/nagios/>   to be
> http://mydomain.com/nagios <http://mydomain.com/nagios>  .    And here
> are the changed I've done so far , which still don't work by the way.

I use the RPM which (on FC1) puts nagios.conf in /etc/httpd/conf.d so it
is automatically included in the httpd.conf file.

I changed 

	Alias /nagios/ /usr/share/nagios/

to

	Alias /nagios /usr/share/nagios/

and restarted the server. Then I entered the URL 

	http://localhost/nagios

It automatically redirected to 

	http://localhost/nagios/

as expected.

> So basically it don't matter what I do to the file cgi.cfg and
> httpd.conf[and of course reload/restart the related services after the
> changes], the only URL that work is still the same one, so Is there
> anything else I am missing here ???

If http://host/nagios won't work, there's something else interfering
with you httpd config. Take it up with your local apache guru who
probably knows your configs better than I do.

If you are expecting http://host/nagios to become the default URL, I
don't think you are ever going to get that. I believe that you only get
to completely drop the trailing slash when referring to a file, not a
directory. That is the reason that supporters of the bandwidth
conservation movement advocate leaving the trailing slash in the configs
- since the URL will redirect to include the trailing slash, you have
force a redirect eating up bandwidth and response time. If you leave the
slash in the configs, you force your documentation writers to use it and
your users get faster responses while your server does less work. Of
course, how you config your server is entirely up to you. But I'm pretty
sure that without a rewrite rule, your default URL will retain the
trailing slash, even when you accept input without the trailing slash.

--
Karl


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list