Solved

apache fails to start up, but says Syntax OK

Posted on 2006-10-29
2
335 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
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 …

732 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