Solved

apache fails to start up, but says Syntax OK

Posted on 2006-10-29
2
320 Views
Last Modified: 2010-03-04
I'm using perl + mysql to generate my vhosts

this is the script:

<Perl>
use DBI;
my ($sth, $dbh, $domain, $domainID, $createdTS, $created, $sql);
$dbh = DBI->connect("DBI:mysql:domain:xxx","xxxx","xxxx");
$sth = $dbh->prepare("SELECT * FROM domain");
$sth->execute();
while (($domainID, $domain, $created) = $sth->fetchrow())
{
        if($created == 0)
        {
                system("/bin/mkdir /home/$domain");
                system("/bin/mkdir /home/$domain/www");
                system("/bin/mkdir /home/$domain/ErrorLog");
                system("/bin/chown apache:apache -R /home/$domain");
                $sql = $dbh->prepare("UPDATE domain SET created = 1 WHERE domainID = $domainID");
                $sql->execute();
        }
        push @{$VirtualHost{"*:80"}}, {
                ServerName      => $domain,
                ServerAlias    => "www.$domain",
                DocumentRoot    => "/home/$domain/www",
                ErrorLog        => "/home/$domain/ErrorLog",
        };
}
</Perl>

but when I try to reload apache with "apachectl graceful" it gives me this error:

apachectl: Configuration syntax error, will not run "graceful":
Syntax OK

and if I run apachectl configtest it says "Syntax OK"

But if I remove the perlscript everything works just fine...

the perl-script is in a seperat filem and is included

. I am running Fedora 6 + apache 2
0
Comment
Question by:ttopholm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 43

Accepted Solution

by:
ravenpl earned 250 total points
ID: 17832164
Can You check the main error_log from apache after trying graceful?
0
 

Author Comment

by:ttopholm
ID: 17832864
My definition of the errorlogfile was uncorrect, thank you
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question