Link to home
Start Free TrialLog in
Avatar of pcelements
pcelementsFlag for Puerto Rico

asked on

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.
ASKER CERTIFIED SOLUTION
Avatar of ziceva
ziceva
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Because you are listing a directory for ErrorLog instead of a filename as you are in the other vhost for domain1.com
Damn, a minute too late ;)
Avatar of pcelements

ASKER

Thanks!!! That was it!