LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 06-02-2004, 01:28 AM   #1
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 12.04 - Server 12.04.4 LTS
Posts: 935

Rep: Reputation: 32
CustomLog Question


Under my httpd file i have the following sample log files

Code:
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
Is it ok to make my own log to each subdomain i have ?

Like so
http://newsite.mydomain.com/

New sub sits /var/www/sites/newsite

Under VirtualHost can i put the following pointing to a CustomLog ?


Code:
<VirtualHost *:80>
    ServerAdmin webmaster@newsite.mydomain.com
    DocumentRoot /var/www/sites/newsite
    ServerName newsite.mydomain.com
    ErrorLog /var/log/httpd/sites/newsite.mydomain.com-error_log
    CustomLog /var/log/httpd/sites/newsite.mydomain.com-access_log common
</VirtualHost>
Would the perms be the same as the error_log ( 0644 ) ?

TT
 
Old 06-02-2004, 10:05 AM   #2
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 12.04 - Server 12.04.4 LTS
Posts: 935

Original Poster
Rep: Reputation: 32
help please

Can some one explain how to get these working.

Do i have to use the same files ( access_log etc ) in my VirtualHost

Here is my VirtualHost test
Code:
<VirtualHost *:80>
    ServerAdmin webmaster@mydomain.com
    DocumentRoot /var/www/sites/sub1
    ServerName sub1.mydomain.com
    DirectoryIndex index.htm index.php
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    ErrorLog var/log/httpd/sub1-error_log
    CustomLog var/log/httpd/sub1-access_log
</VirtualHost>
I do get an error
Starting httpd: Syntax error on line 1080 of /etc/httpd/conf/httpd.conf:
CustomLog takes two or three arguments, a file name, a custom log format string
or format name, and an optional "env=" clause (see docs)

I understand the LogFormats well kind of, but what i dont get is, do the ErrorLog and the CustomLog have to be the same as whats in /var/log/httpd

In my httpd config i have the following
Code:
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

Or can i create my own ?

Any one help me out please, i'm alittle lost here

TT
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question, Apples Contribution to Open Source + MacOs file structure question Higgy3k Other *NIX 5 07-25-2005 05:23 AM
Not your regular GRUB question - just a short question for a fried MBR!! ziphem Linux - General 3 01-31-2005 02:51 PM
2 part question: Speeding up MDK9.1/GNOME question wardialer Linux - Newbie 6 10-14-2004 04:16 PM
login prompt question & kde scheme question JustinCoyan Slackware 2 06-09-2004 03:02 PM
samba smb.config question (quick question) TheDOGG Linux - Networking 1 03-02-2004 08:19 AM


All times are GMT -5. The time now is 01:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration