[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-myserver] Configuration?

From: Ludovic Courtès
Subject: Re: [bug-myserver] Configuration?
Date: Sat, 05 Mar 2011 12:57:47 +0100
User-agent: Gnus/5.110013 (No Gnus v0.13) Emacs/23.2 (gnu/linux)

Hi again!

Giuseppe Scrivano <address@hidden> writes:

> If you also have an empty virtualhosts.xml file, then MyServer will not
> do any listen(2).  At least one virtual host must be defined to make
> MyServer wait for new connections.

I have this:

--8<---------------cut here---------------start------------->8---
<?xml version="1.0"?>

    <NAME>Every connection</NAME>
--8<---------------cut here---------------end--------------->8---

The server (as non-root) loads the file and says “Error opening log
files” and then ignores the VHOST altogether (if I understand
XmlVhostHandler::load correctly.)

The strace(1) output goes like this:

--8<---------------cut here---------------start------------->8---
7508  write(2, "Loading virtual hosts from /home"..., 70) = 70
7508  write(2, "\33[0m", 4)             = 4
7508  write(2, "\33[0m", 4)             = 4
7508  open("/home/ludo/src/nixpkgs/virtualhosts.xml", O_RDONLY) = 9
7508  fstat(9, {st_mode=S_IFREG|0644, st_size=378, ...}) = 0
7508  read(9, "<?xml version=\"1.0\"?>\n\n<VHOSTS>\n"..., 378) = 378
7508  stat("/home/ludo/src/nixpkgs/virtualhosts.xml", {st_mode=S_IFREG|0644, 
st_size=378, ...}) = 0
7508  close(9)                          = 0
7508  write(2, "\33[0m", 4)             = 4
7508  write(2, "\33[0m", 4)             = 4
7508  write(2, "Error opening log files\n", 24) = 24
--8<---------------cut here---------------end--------------->8---

Apparently it didn’t even try to stat the log files, yet it reported
that it failed to open then them.  :-)

Any idea what I’m doing wrong?

I think it’d be nice to change all the ‘continue;’ in
XmlVhostHandler::load to something like:

  fprintf (stderr, "ignoring virtual host `%s'\n", ...);

Likewise, it’d be helpful if “Error opening log files” was changed to
something like “Error opening log file `%s': %m”.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]