Paul Whittaker
Sun, 11 Nov 2007 05:37:25 -0800
Hello,
I'm looking for some help getting mathopd to serve pages when it's
running inside a chroot using the RootDirectory config option.
On the surface everything is ok: it doesn't print any errors at
startup, and there's nothing obviously wrong when I look at the log
files or run the server via the strace command. The log files are
also being correctly constructed inside the chroot, and are written to
when I make requests for pages.
The problem is that I seem only to be able to get "500 Internal Server
Error" responses back when I ask for a page!
If anyone can spot what I'm doing wrong, or (perhaps easier) post a
working mathopd.conf that includes a RootDirectory setting, that would
be great.
Many thanks in advance,
Paul.
---[ mathodp.conf ]---
User www-data
StayRoot Off # Reduce possibility of leaving chroot if compromised.
RootDirectory /var/www
Log access.log
ErrorLog errors.log
Control {
Types {
text/html { * }
}
}
Server {
Port 80
Address 0.0.0.0
Virtual {
AnyHost # Without this I get a 400 Bad Request instead
}
}
---[ end ]---
Output of "find /var/www -ls":
233456 4 drwxr-xr-x 3 www-data www-data 4096 Nov 4 18:50 /var/www
233457 4 -rw-r--r-- 1 www-data www-data 348 Nov 4 19:07 /var/www/errors.log
233458 4 -rw-r--r-- 1 www-data www-data 19 Nov 4 18:49 /var/www/index.html
233459 4 drwxr-xr-x 2 www-data www-data 4096 Nov 4 18:47 /var/www/etc
233460 4 -rw-r--r-- 1 www-data www-data 1323 Nov 4 17:47 /var/www/etc/localtime
233461 4 -rw-r--r-- 1 www-data www-data 392 Nov 4 19:07 /var/www/access.log