Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logging question

Status
Not open for further replies.

timgerr

IS-IT--Management
Joined
Jan 22, 2004
Messages
364
Location
US
I have a Linux box running apache that serves 2 pages. I have set our dns server with 2 aliases that point to 1 ip (that is the apache box) I run a php script that will direct the user to a folder.
Code:
[URL unfurl="true"]http://michiganfaq[/URL]   = [URL unfurl="true"]http://michiganfaq/faq/faq.php[/URL]
[URL unfurl="true"]http://michiganshare[/URL] = [URL unfurl="true"]http://michiganfaq/share/1drop.php[/URL]
I want to enable logging on:
/var//var/How can I enable logging for access and errors on these 2 folders?

Here is the php script that I use:
Code:
$self = $_SERVER['HTTP_HOST']; 
 
 if ($self == "michiganfaq") { 
	 header('Location: [URL unfurl="true"]http://michiganfaq/faq/faq.php');[/URL]
 } 
 elseif ($self == "michiganfaq.XXX.XXX.XXX.com") 
{  //this is if the dns stuff is not correct.
	 header('Location: [URL unfurl="true"]http://michiganfaq.XXX.XXX.XXX.com/faq/faq.php');[/URL]
 }
 elseif ($self == "michiganshare") {
	 header('Location: [URL unfurl="true"]http://michiganshare/share/1drop.php');[/URL] 
 }
elseif ($self == "michiganshare.XXX.XXX.XXX.com") {
	 header('Location: [URL unfurl="true"]http://michiganshare.XXX.XXX.XXX.com/share/1drop.php');[/URL]
}


Thanks,
Timgerr
 
I know that you can customize logging according to url contents, but I'd just use name-based virtual hosts and set the different log files per "host".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top