Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm attempting to set up a domain alias via Pre VirtualHost Include and I'm recieving the following error:

Error:
An error occurred while running: /usr/local/apache/bin/httpd -DSSL -t -f /usr/local/apache/conf/httpd.conf Exit signal was: 0 Exit value was: 1 Output was: --- Syntax error on line 15 of /usr/local/apache/conf/includes/pre_virtualhost_global.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) ---

Basically I have two domains, the main domain has an opencart installation within a directory (/buy) and I'm attempting to use the multi-store function which allows you to administer multiple stores on multiple domains via the one opencart dashboard.

My issue is that I have the opencart installations within the /buy directory so I have been given the following code which should allow me to use this functionality over the multiple cPanel accounts within the same VPS.

 <VirtualHost 87.117.239.29:80>
ServerName newdomain.co.uk
ServerAlias www.newdomain.co.uk
Alias /buy /home/originaldomain/public_html/buy/
DocumentRoot /home/newdom/public_html
ServerAdmin webmaster@newdomain.co.uk
## User newdom # Needed for Cpanel::ApacheConf
<IfModule mod_suphp.c>
suPHP_UserGroup newdom newdom
</IfModule>
<IfModule mod_ruid2.c>
RUidGid newdom newdom
</IfModule>
CustomLog /usr/local/apache/domlogs/newdomain.co.uk-bytes_log “%{%s}t %I .\n%{%s}t %O .”
CustomLog /usr/local/apache/domlogs/newdomain.co.uk combined
ScriptAlias /cgi-bin/ /home/newdom/public_html/cgi-bin/
</VirtualHost>

Does anyone know how to get this code to work?

Thanks,

share|improve this question
    
please note the 'newdomain.co.uk' and 'newdom' throughout the code is there for demonstration purposes. –  Poundtrader Nov 1 '12 at 15:44

1 Answer 1

The problematic line is:

CustomLog /usr/local/apache/domlogs/newdomain.co.uk combined

Apache isn't recognizing combined as a valid log format nickname. The nicknames come from prior LogFormat directives; you will have to find the correct one, and ensure your configuration is loaded after it occurs. If it does not occur or you don't want to do this, use the intended format string instead of the nickname.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.