Unable to start Apache in Centos

Hi:
I partitioned my server like this:
/boot 500MB  
Swap = 8192MB
/ = 20480MB
/var/log = 2049MB
/var/www/virtualdomains = 1048576MB  
/var =5120MB
/var/lib/mysql  =5120MB
/tmp -= 2048MB
/home = 10240MB
FREE 41992MB (41GB) UNALLOCATED

I installed Apache, created a vhost.conf file in /etc/httpd/conf.d/ directory and entered all virtual hosts in that file like this:
NameVirtualHost *:80

<VirtualHost *:80>
     ServerAdmin webmaster@domain1.com
     ServerName domain1.com
     ServerAlias www.domain1.com
     DocumentRoot /var/www/virtualdomains/domain1.com/
     ErrorLog /var/log/virtualdomains/domain1.com/error.log
     CustomLog /var/log/virtualdomains/domain1.com/access.log combined
</VirtualHost>

<VirtualHost *:80>
     ServerAdmin webmaster@domain2.com
     ServerName domain2.com
     ServerAlias www.domain2.com
     DocumentRoot /var/www/virtualdomains/domain2.com/
     ErrorLog /var/log/virtualdomains/domain2.com/
     CustomLog /var/log/virtualdomains/domain2.com/access.log combined
</VirtualHost>

I entered them like this for 7 domains. All are going to use the same IP address.

I created the directories for the domains and for the logs like this for each one:
mkdir -p /var/www/virtualdomains/domain1.com/
mkdir /var/log/virtualdomains/domain1.com/

When I try to start Apache I get: [FAILED]
When I check the log at /var/log/httpd.error_log:
(21)Is a directory: httpd: could not open error log file /var/log/virtualdomains/domain1,com/.
Unable to open logs

I have tried changing the /var/log/virtualdomains folder permissions from 755 to 777, but I get the same error.

Thanks for your help.
pcelementsAsked:
Who is Participating?
 
zicevaCommented:
The second VirtualHost seems to have a incomplete ErrorLog line (it's a directory and it should be a file)
0
 
PapertripCommented:
Because you are listing a directory for ErrorLog instead of a filename as you are in the other vhost for domain1.com
0
 
PapertripCommented:
Damn, a minute too late ;)
0
 
pcelementsAuthor Commented:
Thanks!!! That was it!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.