[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"?>
<VHOSTS>
<VHOST>
<NAME>Every connection</NAME>
<PORT>8080</PORT>
<PROTOCOL>HTTP</PROTOCOL>
<DOCROOT>web</DOCROOT>
<SYSROOT>system</SYSROOT>
<HOST>127.0.0.1</HOST>
<ACCESSLOG>/dev/null</ACCESSLOG>
<WARNINGLOG>/dev/null</WARNINGLOG>
<ALLOW_CGI>NO</ALLOW_CGI>
</VHOST>
</VHOSTS>
--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", ...);
continue;
Likewise, it’d be helpful if “Error opening log files” was changed to
something like “Error opening log file `%s': %m”.
Thanks!
Ludo’.
- [bug-myserver] Configuration?, Ludovic Courtès, 2011/03/03
- Re: [bug-myserver] Configuration?, Giuseppe Scrivano, 2011/03/03
- Re: [bug-myserver] Configuration?,
Ludovic Courtès <=
- Re: [bug-myserver] Configuration?, Giuseppe Scrivano, 2011/03/08
- Re: [bug-myserver] Configuration?, Giuseppe Scrivano, 2011/03/11
- Re: [bug-myserver] Configuration?, Ludovic Courtès, 2011/03/11
- Re: [bug-myserver] Configuration?, Giuseppe Scrivano, 2011/03/13
- Re: [bug-myserver] Configuration?, Ludovic Courtès, 2011/03/16