httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Turner <kk...@sbcglobal.net>
Subject Re: [users@httpd] virtual host error
Date Thu, 23 Jan 2003 16:25:33 GMT
Gunter Verbocht wrote:

>I have this problem:
>I want to create a virtual hosting account with apache 1.3.26
>I have found some documentation on this, and I want to add separate log
>files for this account. I have tried this code in httpd.conf:
>
>  <VirtualHost *>
>  ServerName www.virtdomain1.com
>  DocumentRoot /usr/local/www/virtdomain1.com
>  ScriptAlias  /cgi-bin/  "/usr/local/www/www.virtdomain1.com"
                                           ^^^^^^^^^^^^^^^^^^^
   # no offense, but that is a butt-ugly directory name :)

	# is there a particular reason for not using your
	# global cgi directory?

	# don't you need to make a directory directive
	# for the CGI directory?

		<Directory /usr/local/www/www.virtdomain1.com/>
			AllowOverride None
			Options ExecCGI		# tell Apache that executables
			Order allow,deny		# live here
			Allow from all
		</Directory>

>  ErrorLog /usr/local/www/virtdomain1.com/logs/virtdomain1.com-error_log
>  TransferLog
>/usr/local/www/virtdomain1.com/logs/virtdomain1.com-transfer_log
>  </VirtualHost>

>When I use this code, Apache doesn't want to restart, and gives an error
>that apachectl can't be started. When I remove the 
>  ErrorLog /usr/local/www/virtdomain1.com/logs/virtdomain1.com-error_log

Except for non-FHS compliant path and odd name, I see nothing wrong
here.  I would do it like this:

ErrorLog /var/log/apache/domain1/error.log  


>  TransferLog \
>/usr/local/www/virtdomain1.com/logs/virtdomain1.com-transfer_log

I'm not familiar with "TransferLog" (not surprising in light of my
limited knowledge).  I would do it something like this:

LogFormat "%h %l %u %t \"%r\" %>s %b \"{referer}i\"" common
CustomLog /var/log/apache/domain1/access.log common

(These are not tested.  I think I got it right, but what do I know?)

>Rules, Apache starts perfectly.
>
>So it seems that apache cannot create these log files. How come?
>
>Also, Apache does not create a cgi-bin directory automatically. Is it
>really necessary that I create this directory myself?

Yes.  Your ScriptAlias only points to the directory.  The directory must
exist, therefore you need to make it.  The same applies to the log
paths.

--
gt           kk5st@sbcglobal.net
The advice is free, and worth every cent.

---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message