[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: virtual hosts with own cgi-bin?
> > If user robert has a sub diretory called website in his home directory.
> >
> > If I alias the cgi-bin to:
> > /home/robert/website/cgi-bin
> >
> > this may come back to bite me?
>
> No, it's fine (probably preferable) to put the website in the user's home
> directory. I was talking about the cgi-bin part. If there's a directory
> /home/robert/website, and it's set up as the document root for
> robert.domain.com, then /home/robert/website/cgi-bin is already accessible
> as http://robert.domain.com/cgi-bin, but it's not able to run CGI scripts
> (by default). When you do the ScriptAlias thing, it aliases the cgi-bin
> directory to the same place where it would have been accesible before.
>
> There's nothing technically wrong with that, but doing things like that
> make it slightly more difficult to debug when problems show up. For
> example, say you accidentally type "ScriptAlas
> /home/robert/website/cgi-bin /cgi-bin" - you forgot the "i" in alias.
> It's not immediately obvious what the problem is, because you can see the
> cgi-bin directory in a web browser, but it's not running scipts. So, you
> waste a lot of time checking file permissions, verifying mime-types, etc.
> If the cgi-bin directory was instead /home/robert/cgi-bin, then any error
> in the ScriptAlias line will completely prevent the cgi-bin URL from
> showing up in a web browser. My view is that, if you're going to alias
> a directory into the URL space, it shouldn't already be there.
This was very helpful. I'll move the cgi-bin to /home/user/ and alias it there. Then I'll move the stuff from /var/www/cgi-bin to the users cgi-bin and see how that works.
Thanks for taking the time to explain it this way. I have a better understanding of it now.
I'm just now beginning to understand things that evaded me only just recently. It's like the early teen realizations... All of the sudden your brain starts making the right connections and it all starts making sense. :-)
--John
-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.