On Wed, Mar 16, 2016 at 8:58 PM, Alan Corey <alan01...@gmail.com> wrote:
> I don't have enough room in / to have my htdocs there so I want to
> move it to /usr/htdocs. This is in 5.7.   No problem I thought, I've
> had to do it before.  So my /etc/httpd.conf looks like this:
>
> chroot "/usr/htdocs"

It's probably supposed to be

chroot "/usr"

Check out `man httpd.conf`.  Look at the descriptions for the `chroot`
and `root` settings.  It appears that both of these settings combine
to get you what you're looking for in this case.

> server "d530.my.domain" {
>   listen on * port 80
> }
>
> And I get logging into /usr/htdocs/logs but httpd doesn''t seem to
> find files in /usr/htdocs.  I get a 404 error that says OpenBSD httpd
> in it but it can't find even index.html which does exist.  I've played
> with htdocs vs htdocs/.  If I comment out the chroot line it finds
> files in /var/www/htdocs.  My /usr is in a different MBR partition
> (actually an exended one) with 129 gigs free.
>
> Anybody tried to move their htdocs?  I didn't find anything by
> searching.  I wouldn't want to write something and put it out there
> for everybody to beat on.  I did read the PDF and man pages.
>
> Also I found that if I set httpd_flags to "-d -v" in
> /etc/rc.conf.local then booting  the machine seems to hang there.
> Permissions on the file look like:
> -rwxr--r--  1 www  daemon  4022 Jan 19  2015 index.html
>
> --
> Credit is the root of all evil.  - AB1JX

Reply via email to