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.
Apache Web ServerLinuxWeb Servers

Avatar of undefined
Last Comment
pcelements
ASKER CERTIFIED SOLUTION
Avatar of ziceva
ziceva
Flag of Romania image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Papertrip
Papertrip
Flag of United States of America image

Because you are listing a directory for ErrorLog instead of a filename as you are in the other vhost for domain1.com
Avatar of Papertrip
Papertrip
Flag of United States of America image

Damn, a minute too late ;)
Avatar of pcelements
pcelements
Flag of Puerto Rico image

ASKER

Thanks!!! That was it!
Linux
Linux

Linux is a UNIX-like open source operating system with hundreds of distinct distributions, including: Fedora, openSUSE, Ubuntu, Debian, Slackware, Gentoo, CentOS, and Arch Linux. Linux is generally associated with web and database servers, but has become popular in many niche industries and applications.

71K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo