Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 17th December 2009, 20:13
dxh dxh is offline
Junior Member
 
Join Date: Nov 2009
Posts: 14
Thanks: 5
Thanked 0 Times in 0 Posts
Default Help with ispconfig 3 perfect ubuntu and urchin

I am trying to set up urchin profiles for the sites I have hosted with my ispconfig server. The main thing I need to do is change log settings.
This line was added to apache2/apche2.conf file:
LogFormat "%v 135594252 t \"r\" >s b \"{Referer}i\" \"{User-Agent}i\" \"{Cookie}i\"" special

but I can't find the vhost info.

From the urchin docs:
Examine the <VirtualHost> entry you wish to enable this logging for.
Insert a # in front of any existing TransferLog or CustomLog entries to deactivate it/them, and insert the following (editing the pathname appropriately for your environment):

CustomLog /www/serverlogs/www.urchin.com_cookie_log special

My question is where can I find the site specific logs?
What file has the log config for the individual sites.

I am sorry if this is basic. I am still new to the linux world.
FYI Urchin is installed on a win2k3 machine.
Thanks for reading

Dave

Last edited by dxh; 17th December 2009 at 20:18.
Reply With Quote
Sponsored Links
  #2  
Old 21st December 2009, 21:16
dxh dxh is offline
Junior Member
 
Join Date: Nov 2009
Posts: 14
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Does anyone have any experience setting up urchin profiles for sites running under ispconfig3? I really just need to customize log format and location for all the vhosts (sites) that are running on my ispconfig machine. Here is what google says:
Quote:
Procedure

Configuring Apache or Microsoft IIS to properly log for Urchin

Apache:
Note: Apache uses an NCSA-type log format. By default, Apache generally logs in "common" log format.
For optimal reporting, Urchin requires the "combined" log format with cookies enabled.

Decide if you are going to use cookies and the Urchin Tracking Module (UTM),
or IP-based visitor tracking. UTM-based tracking is the only way to get true unique visitor reporting.
Use "vi" or other text editor to open your httpd.conf file.
Locate the LogFormat entry or entries.
Comment out the existing LogFormat (if any) by inserting a # in front of any lines
that do not have them already. This deactivates those lines.
Insert one of these lines, depending on whether you wish to use the Urchin Traffic Monitor (UTM)
or not. Be sure that the line is entered into your configuration file as a single line, without carriage returns:
Non-UTM (IP or IP+UserAgent tracking)

LogFormat "%l 135594252 t \"r\" >s b \"{Referer}i\" \"{User-Agent}i\"" special

Urchin Traffic Monitor (UTM):

LogFormat "%v 135594252 t \"r\" >s b \"{Referer}i\" \"{User-Agent}i\" \"{Cookie}i\"" special

Examine the <VirtualHost> entry you wish to enable this logging for. Insert a # in
front of any existing TransferLog or CustomLog entries to deactivate it/them,
and insert the following (editing the pathname appropriately for your environment):
CustomLog /www/serverlogs/www.urchin.com_cookie_log special

Note the "special" text at the end of the line. This is the name of this particular CustomLog,
as specified in the LogFormat entry above. You can name your log format anything you
like; "special" is a common choice for non-standard formats.

Write/quit the edit of httpd.conf.
IMPORTANT: run this program to check your syntax:
apachectl configtest

You should get syntax ok. If not, check the httpd.conf file and fix any errors.

Restart Apache. The preferred method is with this script (included with Apache):
apachectl restart

Check the logging. Open a browser and hit the site in question a few times. Examine the log file
(as specified in #6 above.) You should see a several hits being written to the log. For standard
"combined" log format, a log line will look similar to this:
64.40.51.27 www.urchin.com - [28/Aug/2002:15:11:01 -0700] "GET /images/urchin_header_logo.gif HTTP/1.1" 200 3017 "http://www.urchin.com/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"

If you have configured the UTM on the site, a log line will look similar to this
(note the additional cookie field with the embedded UTM information):

64.40.51.27 www.urchin.com - [28/Aug/2002:15:11:01 - 0700] "GET /images/urchin_header_logo.gif HTTP/1.1" 200 3017 "http://www.urchin.com/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" "__utm1= 459278579.1030573053; __utm2=1030573053; __utm3=1030573053"
Reply With Quote
  #3  
Old 22nd December 2009, 15:47
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,726 Times in 2,565 Posts
Default

I've never worked with Urchin...
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #4  
Old 22nd December 2009, 22:54
bnight bnight is offline
Junior Member
 
Join Date: Dec 2009
Posts: 4
Thanks: 0
Thanked 3 Times in 3 Posts
Default

dxh

Here is what I done to get this working:

I edit /etc/apache2/apache2.conf

And add this line:

LogFormat "%h %v %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{Cookie}i\"" urchin

Above:

# Include the virtual host configurations:

So the /etc/apache2/apache2.conf looks like this:

LogFormat "%h %v %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{Cookie}i\"" urchin

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/

Next I go to the ISPConfig 3 panel and from tab sites i chose with site i want to edit:

I chose Options tab

And add this in the text box Apache directives:

CustomLog /var/log/ispconfig/httpd/domain.com/urchin.log urchin

And then hit Save button.

Now my log in the urchin format is /var/log/ispconfig/httpd/domain.com/urchin.log

Then

chmod 755 /var/log/ispconfig/httpd/bnight.com/

So the urchin daemon can read the log.

That`s it.

I hope that this will work for you.

Last edited by bnight; 22nd December 2009 at 23:10.
Reply With Quote
The Following User Says Thank You to bnight For This Useful Post:
dxh (22nd December 2009)
  #5  
Old 22nd December 2009, 23:19
dxh dxh is offline
Junior Member
 
Join Date: Nov 2009
Posts: 14
Thanks: 5
Thanked 0 Times in 0 Posts
Default

You are my personal savior this holiday season

This worked like a charm.

Last edited by dxh; 23rd December 2009 at 00:27.
Reply With Quote
  #6  
Old 23rd December 2009, 00:54
dxh dxh is offline
Junior Member
 
Join Date: Nov 2009
Posts: 14
Thanks: 5
Thanked 0 Times in 0 Posts
Default

darn, I was adding an apache directive to another site in ispconfig and I made a typo. Hitting save seemed to kill apache and now I get a fail when trying to restart it.
What did I do? or better
Is there a way to fix it.

Thanks
Reply With Quote
  #7  
Old 23rd December 2009, 01:12
dxh dxh is offline
Junior Member
 
Join Date: Nov 2009
Posts: 14
Thanks: 5
Thanked 0 Times in 0 Posts
Default

For now I reverted to a snapshot. Not sure what I did.
Reply With Quote
  #8  
Old 23rd December 2009, 09:51
bnight bnight is offline
Junior Member
 
Join Date: Dec 2009
Posts: 4
Thanks: 0
Thanked 3 Times in 3 Posts
Default

OK so here is what you can do to fix this one:

First remove the lines from ISPConfig 3 options and hit save.

Then if the apache2 don`t start

Edit: /etc/apache2/sites-available/domain.com.vhost

And remove the lines that you add with the typo error.

Then restart apache.

/etc/init.d/apache2 restart

And this is it.
Reply With Quote
The Following User Says Thank You to bnight For This Useful Post:
dxh (23rd December 2009)
  #9  
Old 23rd December 2009, 18:43
dxh dxh is offline
Junior Member
 
Join Date: Nov 2009
Posts: 14
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Thanks for all your help. I am working and urchin profiles are running.
Just out of curiosity: what log settings do you use for the apache logs in urchin?
I use w3c for my IIS sites, and for now I am using auto for apache sites. Not sure if there is a better choice.
Either way, thank you for all your help in getting this working. Places like this make moving to open source a reality for the folks like me
Reply With Quote
  #10  
Old 23rd December 2009, 18:47
bnight bnight is offline
Junior Member
 
Join Date: Dec 2009
Posts: 4
Thanks: 0
Thanked 3 Times in 3 Posts
 
Default

Dave i don`t use Urchin just setup one on some test environment to see how it works and help you. I use auto for the logs from apache and it works like a charm.

Have a nice christmas,

Hristofor
Reply With Quote
The Following User Says Thank You to bnight For This Useful Post:
dxh (23rd December 2009)
Reply

Bookmarks

Tags
ispconfig 3, urchin

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:47.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.