Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 429632 - www-servers/thttpd-2.26 and (and other www-servers) install /var/www/localhost/htdocs/index.html (possibly breaks webapp-config based installs or just your website)
Summary: www-servers/thttpd-2.26 and (and other www-servers) install /var/www/localhos...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on: 449136
Blocks:
  Show dependency tree
 
Reported: 2012-08-03 11:19 UTC by Jeroen Roovers (RETIRED)
Modified: 2013-01-17 17:57 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Roovers (RETIRED) gentoo-dev 2012-08-03 11:19:40 UTC
I started apache today and to my amazement I found it displayed the (s)thttpd default, which turned out to be /var/www/localhost/htdocs/index.html and owned by the www-servers/thttpd ebuild.

With webapp-config based ebuilds installed, it's probably not a good idea to write to that directory directly, possibly overwriting something "carefully" installed through webapp-config.

Even on it webapp-config based sites, it could overwrite or otherwise break whatever is run from the HTTP root directory.
Comment 1 Anthony Basile gentoo-dev 2012-08-03 12:10:57 UTC
(In reply to comment #0)
> I started apache today and to my amazement I found it displayed the
> (s)thttpd default, which turned out to be
> /var/www/localhost/htdocs/index.html and owned by the www-servers/thttpd
> ebuild.
> 
> With webapp-config based ebuilds installed, it's probably not a good idea to
> write to that directory directly, possibly overwriting something "carefully"
> installed through webapp-config.
> 
> Even on it webapp-config based sites, it could overwrite or otherwise break
> whatever is run from the HTTP root directory.

Maybe we should take this opportunity to establish a standard.  Here's what's going on with our other www-servers:

1) thttpd installs the following under /var/www:

/var/www/localhost/htdocs/cgi-bin/ssi
/var/www/localhost/htdocs/cgi-bin/phf
/var/www/localhost/htdocs/cgi-bin/redirect
/var/www/localhost/htdocs/cgi-bin/printenv
/var/www/localhost/htdocs/index.html


2) monkeyd installs:

/var/www/localhost/htdocs/404.html
/var/www/localhost/htdocs/imgs/monkey_logo.png
/var/www/localhost/htdocs/index-monkey.html
/var/www/localhost/htdocs/favicon.ico


3) cherokee installs:

/var/www/localhost/htdocs/images/default-bg.png
/var/www/localhost/htdocs/images/powered_by_cherokee.png
/var/www/localhost/htdocs/images/cherokee-logo.png
/var/www/localhost/htdocs/images/favicon.ico
/var/www/localhost/htdocs
/var/www/localhost/htdocs/index.html


4) lightthpd installs:

/var/www/localhost/htdocs <- just the directory


5) apache doesn't install anything.


A subtle point about cherokee and lighttpd, they actually "install" the directory so that /var/www/localhost/htdocs is part of the list of files belonging to the package.


My recommendation is that 1) no www-server install anything under /var/www, 2) the branding that comes with monkeyd, cherokee etc, be moved to /usr/share/doc/${P}/htdocs-default


I take care of monkeyd, cherokee and thttpd (in fact, I forked the code for the latter since its been abandoned for six years, yet users protested dropping it).  wired and hwoarang take care of lighttpd.

Opinions?  We can then adjust our packages accordingly
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-03 12:58:49 UTC
1) Do we actually need /anything/ in the docroot for a specific server to work?
   Wouldn't it simply return a 404 (when a required file is absent) or perhaps a
   5NN (when the presence of a file is considered a required part of the
   configuration)?

2) If the files are required to be installed there, is webapp-config capable of
   handling the stuff you would want to have in the docroot?

3) If not, should we fix webapp-config to handle that?
Comment 3 Anthony Basile gentoo-dev 2012-08-05 15:54:04 UTC
(In reply to comment #2)
> 1) Do we actually need /anything/ in the docroot for a specific server to
> work?

I tested and we do not.  All you need is a directory /var/www/localhost/htdocs but it can (and should) be empty.  So I'm taking the approach of lightthpd.

I've applied the change to thttpd-2.26.4-r1.  Take a look and let me know what you think and I'll do the same for monkeyd and cherokee.
Comment 4 Anthony Basile gentoo-dev 2012-08-08 20:29:52 UTC
Okay all of the www-servers I take care of now install nothing into /var/www/localhost/htdocs.  I moved their "logo" pages to /usr/share/doc/${PF}/htdocs.dist.

I think this issue is done.  Reopen if there's anything else.