Solved

apache fails to start up, but says Syntax OK

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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 you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

726 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