traliing slash in URL path configuration

Yao, Jack jyao at aav.com.au
Tue Mar 2 05:11:08 CET 2004


Hi Karl  [and all others Nagios list Members],

Ah.. It is just not about how much workload server will have only, I am
afraid.  I am also curious that in nagios document, it states very clear
that by changing the URL html path from "/nagios/" to be "/nagios" in
cgi.cfg and make the Alias in httpd.conf to be without trailing slah as
well. The browser should then accept the user to type
http://mydomain.com/nagios  and redirect to http://mydomain.com/nagios/  

But what happen to me now is that, after I have done all the changed as
described in the document, the browser still don't accept user to type
http://mydomain.com/nagios .  Whenever user types http://mydomain.com/nagios
, it will reditect to http://_default_/nagios   and display "page cannot be
display error, server not found.."  

And browser still only accept user to type http://mydomain.com/nagios/   as
if the changes in cgi.cfg and in httpd.conf did not have any effect at all.


I guess the 2 majot questions here are:

1.  Do I miss any other part of configuration that might state somewhere
else in the document but I did not see it ?

2. Or Does the document not cover everything as it should be ?

And I don't think it is Apache issue as the url http://mydomain.com/nagios/
still works fine, so the Apache is definitely working, as well as Nagios.

And I notice that you use the path in the Alias set up as Alias /nagios
/usr/share/nagios/ , while the one I am using now is Alias /nagios
/usr/local/nagios/share  , is that a typo or it is actually different path
???


Any helps are really appreciated

Thanks

Jack






-----Original Message-----
From: Karl DeBisschop [mailto:karl at debisschop.net] 
Sent: Tuesday, 2 March 2004 1:46 PM
To: Yao, Jack
Cc: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] traliing slash in URL path configuration


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