Mailing List Archive

RE: .htaccess problems step 1
Thanks. We will start with the Error Document

In the httpd.conf file:

Documentroot "/usr/local/www/data"

Alias /nz "usr/local/www/nz"

<Directory "/usr/local/www/nz">
Options Indexes Multiviews
AllowOverride All
Order allow,deny
Allow from All
</Directory>

#All other settings are the default ones

I have no settings in srm.conf

Contents of my .httaccess (/usr/local/www/nz)

#Error document
ErrorDocument 404 /error.html


The webpage works fine but I don't get the custom error page



-----Original Message-----
From: Joshua Slive [mailto:joshua@slive.ca]
Sent: Thursday, 17 January 2002 2:07 p.m.
To: users@httpd.apache.org
Subject: RE: .htaccess problems


> From: Defryn, Guy [mailto:G.P.Defryn@massey.ac.nz]

[still not working]

It is very difficult dealing with all these things simultaneously. Why
don't you do the following:

1. Try one problem at a time.

2. Report exactly the relevant part of httpd.conf, including the
DocumentRoot. Don't make random changes before you post; just copy and
paste into the email.

3. Report exactly what URL you are typing into the browser, and exactly what
you see as a result, in addition to the exact contents of the error and
access logs.

With that information, we should be able to help.

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: .htaccess problems step 1 [ In reply to ]
> From: Defryn, Guy [mailto:G.P.Defryn@massey.ac.nz]

> Thanks. We will start with the Error Document
>
> In the httpd.conf file:
>
> Documentroot "/usr/local/www/data"
>
> Alias /nz "usr/local/www/nz"
>
> <Directory "/usr/local/www/nz">
> Options Indexes Multiviews
> AllowOverride All
> Order allow,deny
> Allow from All
> </Directory>
>
> #All other settings are the default ones
>
> I have no settings in srm.conf
>
> Contents of my .httaccess (/usr/local/www/nz)
>
> #Error document
> ErrorDocument 404 /error.html
>
>
> The webpage works fine but I don't get the custom error page
>

Okay. That's a better start. But I still have a question: Do you get the
MSIE "friendly" error page, or do you get the Apache canned error response.
If the former, make sure that error.html is "big enough" (pad it with a
bunch of space if necessary). If the latter, where in httpd.conf have you
placed the ErrorDocument directive? What does the error log say?

If this is a publically-accessible site, you could give the URL so that we
could test it.

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: .htaccess problems step 1 [ In reply to ]
Thanks.

The error page is the MSIE one. I checked the error log
And it says it cannot find the /usr/local/www/data/error.html file

So it is looking in the wrong place. I can't see anything about an
errordirective in the httpd.conf file.
I assumed that it would look in the directory where your .httaccess file is
Placed.

The page is not on the web






Okay. That's a better start. But I still have a question: Do you get the
MSIE "friendly" error page, or do you get the Apache canned error response.
If the former, make sure that error.html is "big enough" (pad it with a
bunch of space if necessary). If the latter, where in httpd.conf have you
placed the ErrorDocument directive? What does the error log say?

If this is a publically-accessible site, you could give the URL so that we
could test it.

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: .htaccess problems step 1 [ In reply to ]
> From: Defryn, Guy [mailto:G.P.Defryn@massey.ac.nz]

>
> The error page is the MSIE one. I checked the error log
> And it says it cannot find the /usr/local/www/data/error.html file
>
> So it is looking in the wrong place. I can't see anything about an
> errordirective in the httpd.conf file.
> I assumed that it would look in the directory where your
> .httaccess file is
> Placed.

That would be a faulty assumption.

When you say
Errordocument 404 /blah.html

It looks in the same place that it looks if you say
http://yourhost.example.com/blah.html.

Try putting it there.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: .htaccess problems step 1 [ In reply to ]
Thanks,

I have copied the /usr/local/www/nz/error.html to /usr/local/www/data.
This must be the path it is looking for as the error log referred to it
When I enter an unknown html file it still gives me the MSIE error
I have put some more text and breaks in my custom error file.

Before it gave the error : can't find /usr/local/www/data/error.html
But that does not show up any more in the log


> From: Defryn, Guy [mailto:G.P.Defryn@massey.ac.nz]

>
> The error page is the MSIE one. I checked the error log
> And it says it cannot find the /usr/local/www/data/error.html file
>
> So it is looking in the wrong place. I can't see anything about an
> errordirective in the httpd.conf file.
> I assumed that it would look in the directory where your
> .httaccess file is
> Placed.

That would be a faulty assumption.

When you say
Errordocument 404 /blah.html

It looks in the same place that it looks if you say
http://yourhost.example.com/blah.html.

Try putting it there.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: .htaccess problems step 1 [ In reply to ]
> From: Defryn, Guy [mailto:G.P.Defryn@massey.ac.nz]

>
> I have copied the /usr/local/www/nz/error.html to /usr/local/www/data.
> This must be the path it is looking for as the error log referred to it
> When I enter an unknown html file it still gives me the MSIE error
> I have put some more text and breaks in my custom error file.
>
> Before it gave the error : can't find /usr/local/www/data/error.html
> But that does not show up any more in the log
>

Well, perhaps you haven't made the file big enough yet.

Why don't you try with a real web browser (something other than MSIE).

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: .htaccess problems step 1 [ In reply to ]
Netscape does the job! I think I have the Authethication working so I will
move on to the redirecting problem

Redirect /page.html http://www.mydomain.com/ does not work yet.

I have a copy in /usr/local/www/nz
And one in /usr/local/www/data (default doc.root for server)but neither
worked

-----Original Message-----
From: Joshua Slive [mailto:joshua@slive.ca]
Sent: Thursday, 17 January 2002 4:02 p.m.
To: users@httpd.apache.org
Subject: RE: .htaccess problems step 1


> From: Defryn, Guy [mailto:G.P.Defryn@massey.ac.nz]

>
> I have copied the /usr/local/www/nz/error.html to /usr/local/www/data.
> This must be the path it is looking for as the error log referred to it
> When I enter an unknown html file it still gives me the MSIE error
> I have put some more text and breaks in my custom error file.
>
> Before it gave the error : can't find /usr/local/www/data/error.html
> But that does not show up any more in the log
>

Well, perhaps you haven't made the file big enough yet.

Why don't you try with a real web browser (something other than MSIE).

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: .htaccess problems step 1 [ In reply to ]
> From: Defryn, Guy [mailto:G.P.Defryn@massey.ac.nz]

> Netscape does the job! I think I have the Authethication working so I will
> move on to the redirecting problem
>
> Redirect /page.html http://www.mydomain.com/ does not work yet.
>
> I have a copy in /usr/local/www/nz
> And one in /usr/local/www/data (default doc.root for server)but neither
> worked

What is the exact URL that you are requesting in your browser? This
redirect will only work if it is http://yourhost.example.com/page.html

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: .htaccess problems step 1 [ In reply to ]
I entered :

http://servername/nz/page.html and tried to redirect it to a url like
www.amazon.com and to http://servername/

Can I only redirect pages out of the document root ?

-----Original Message-----
From: Joshua Slive [mailto:joshua@slive.ca]
Sent: Thursday, 17 January 2002 4:28 p.m.
To: users@httpd.apache.org
Subject: RE: .htaccess problems step 1


> From: Defryn, Guy [mailto:G.P.Defryn@massey.ac.nz]

> Netscape does the job! I think I have the Authethication working so I will
> move on to the redirecting problem
>
> Redirect /page.html http://www.mydomain.com/ does not work yet.
>
> I have a copy in /usr/local/www/nz
> And one in /usr/local/www/data (default doc.root for server)but neither
> worked

What is the exact URL that you are requesting in your browser? This
redirect will only work if it is http://yourhost.example.com/page.html

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: .htaccess problems step 1 [ In reply to ]
> From: Defryn, Guy [mailto:G.P.Defryn@massey.ac.nz]

> I entered :
>
> http://servername/nz/page.html and tried to redirect it to a url like
> www.amazon.com and to http://servername/
>
> Can I only redirect pages out of the document root ?

You really seem to be missing the concept of URL-Path. It is exactly the
same as the ErrorDocument argument. It must be relative to the root of the
webspace. So what you want is

Redirect /nz/page.html http://www.amazon.com/

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Counting hits [ In reply to ]
Hi,

I use Apache and Tomcat, JSP and Sevlets on our site www.capucino.co.uk
I have looked at the docs and archives but cannot see how to count site
hits.
I can see all of the activity in the logs. Are there tools available to
analyse the logs?
Is there a simple counter and/or more complex ones?

Regards,

John



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Counting hits [ In reply to ]
I recommend a utility called awstats. It's very configurable and gives a
wealth of information.

http://awstats.sourceforge.net/

On Thursday 17 January 2002 01:56 am, jbell004@btclick.com wrote:
> I use Apache and Tomcat, JSP and Sevlets on our site www.capucino.co.uk
> I have looked at the docs and archives but cannot see how to count site
> hits.
> I can see all of the activity in the logs. Are there tools available to
> analyse the logs?
> Is there a simple counter and/or more complex ones?

--
Casey Allen Shobe
cshobe@softhome.net

'Why do people with closed minds always open their mouths?'

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Counting hits [ In reply to ]
There are many, many log analyzers out there.

Specific:
The Webalizer
Perlfect DailyStats
AWStats

Listings:
The CGI Resource Index - Perl based
The CGI Resource Index - C / C++ based
The PHP Resource Index
http://www.nonags.com > Server Tools
Download.com
TUCOWS


-=- RuneImp
ImpTech - Web Design, Hosting & Computer Tech
http://imptech.net
rune@imptech.net


----- Original Message -----
From: <jbell004@btclick.com>
To: <users@httpd.apache.org>
Sent: Wednesday, January 16, 2002 10:56 PM
Subject: Re: Counting hits


Hi,

I use Apache and Tomcat, JSP and Sevlets on our site www.capucino.co.uk
I have looked at the docs and archives but cannot see how to count site
hits.
I can see all of the activity in the logs. Are there tools available to
analyse the logs?
Is there a simple counter and/or more complex ones?

Regards,

John
RE: Counting hits [ In reply to ]
Casey,

I am trying to setup the awstats, the awstats.pl returns an error as below
when executed for the first time. What changes do I need to make in the
httpd.conf to change the log file format. I am running apache on NT 4.0.

AWStats did not found any valid log lines that match your LogFormat
parameter, in the 50th first non commented lines read of your log. Your log
file c:\program files\apache group\apache\logs\error.log must have a bad
format or LogFormat parameter setup does not match this format. Your
LogFormat parameter is 1, this means each line in your log file need to have
"combined log format" like this:
111.22.33.44 - - [10/Jan/2001:02:14:14 +0200] "GET / HTTP/1.1" 200 1234
http://www.fromserver.com/from.htm" "Mozilla/4.0 (compatible; MSIE 5.01;
Windows NT 5.0)"
And this is a sample of what AWStats found in your log (the record number 50
in your log):
[Wed Nov 28 14:29:22 2001] [error] [client 10.90.74.122] File does not
exist: c:/program files/apache group/apache/htdocs/sqlsrvr.html

Setup (C:\PROGRA~1\APACHE~1\APACHE\cgi-bin\awstats.conf file, web server or
permissions) may be wrong.
See README.TXT for informations on how to setup awstats.

Thanks
Bal.



-----Original Message-----
From: Casey Allen Shobe [mailto:cshobe@softhome.net]
Sent: Thursday, January 17, 2002 2:13 AM
To: users@httpd.apache.org
Subject: Re: Counting hits


I recommend a utility called awstats. It's very configurable and gives a
wealth of information.

http://awstats.sourceforge.net/


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: Counting hits [ In reply to ]
> From: Sabherwal, Balvinder (MBS)
> [mailto:Balvinder.Sabherwal@mortgagefamily.com]

>
> I am trying to setup the awstats, the awstats.pl returns an error as below
> when executed for the first time. What changes do I need to make in the
> httpd.conf to change the log file format. I am running apache on NT 4.0.

You are pointing the program at your error.log, while it expects to use the
access.log. The format it expects is the one you will get if you use the
line

CustomLog logs/access.log combined

in the default httpd.conf.

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org