Solved

apache fails to start up, but says Syntax OK

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

708 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now