Page MenuHomePhabricator

Tool Labs: Webservices with Apache-specific configuration not working in eqiad
Closed, ResolvedPublic

Description

Author: dr.trigon

Description:
I did exactly as mentioned in https://wikitech.wikimedia.org/wiki/Tool_Labs/Migration_to_eqiad#Phase_III_.28restoring_bulk_copied_tools.29

Result:

1.) public_html does not work anymore, see http://tools.wmflabs.org/drtrigonbot/docs/
2.) cgi-bin does not work anymore, see http://tools.wmflabs.org/drtrigonbot/cgi-bin/panel.py

I need support on how to solve these, please.


Version: unspecified
Severity: blocker

Details

Reference
bz62976

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:55 AM
bzimport added a project: Toolforge.
bzimport set Reference to bz62976.

metatron wrote:

Since with new lighttpd webservice everything is being served from public_hmL try the following steps:

  1. $ webservice stop
  2. $ mv cgi_bin/ public_html/
  3. with editor create/open file: ~/.lighttpd.conf
  4. insert following lines:

debug.log-request-handling = "enable"
fastcgi.debug = 1

$HTTP["url"] =~ "^/your_tool/cgi-bin" {

cgi.assign = ( "" => "" )

}

  1. save
  2. $ webservice start

check wit command $ qstat if your webservice has already startet (state = r)
At least http://tools.wmflabs.org/drtrigonbot/cgi-bin/panel.py should show up then. Maybe you have to tweak some symlinks/ filepaths afterwards.

greets

metatron wrote:

Of course replace <your_tool> with drtrigonbot, so it lokks like this:

debug.log-request-handling = "enable"
fastcgi.debug = 1

$HTTP["url"] =~ "^/drtrigonbot/cgi-bin" {

cgi.assign = ( "" => "" )

}

Note: it may take some secs until webservice is started. Check with $ qstat. Webservice Errors can be found in: error.log

The cgi-bin solution is documented at [[wikitech:Nova Resource:Tools/Help#Web services]], BTW.

Re http://tools.wmflabs.org/drtrigonbot/docs/, ~tools.drtrigonbot/public_html/docs is a symlink to /data/project/drtrigonbot/pywikibot-compat/docs which doesn't contain an index.html. What is your expected behaviour? If you want an automatic listing of the directory's contents, you need to enable dir-listing.activate as documented under "Directory or file index".

DrTrigon, do you still have difficulties with your /cgi-bin/?

dr.trigon wrote:

Sorry! I did not had time to look into this (honestly I still don't have... ;).

Comment 1 and 2 were very useful to get my cgi-bin running again!

Comment 3 now points into the right direction to proceed; I need e.g. http://tools.wmflabs.org/drtrigonbot/logs/ to give a directory listing - how to do?

dr.trigon wrote:

(In reply to Marc A. Pelletier from comment #6)

Look at "directory or file index" under
https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/
Help#Example_configurations

Actually precise at this moment I was able to get 'basic directory index' and even 'status and statistics' running. But how to open a file in browser instead of download, see e.g. http://tools.wmflabs.org/drtrigonbot/logs/compat/README
With .htaccess I could do: AddType text/plain .log > .htaccess

dr.trigon wrote:

Sorry:

With .htaccess I could do: AddType text/plain .log > .htaccess

I meant; With .htaccess I could use: AddType text/plain .log

(In reply to DrTrigon from comment #8)

Sorry:

With .htaccess I could do: AddType text/plain .log > .htaccess

I meant; With .htaccess I could use: AddType text/plain .log

Exactly one section above "Directory or file index" is "Header, mimetype, error handler" with:

# Add custom mimetype
mimetype.assign += ( ".bulk" => "text/plain" )

Closing for now since this change is by design.

In the pmtpa Tool Labs, the default web server was Apache. In eqiad, there is no default web server.

The server created by "webservice start" runs lighthttpd, this was already the case in pmtpa as well.

The problem is caused because in eqiad we no longer support tools running on a non-distributed catch-all Apache. Instead tools should use their own webservice, and labs has settled on using lighthttpd.

Incompatibilities would occur in either direction. To learn about lighthttpd and example for common configuration options, see 'Example configurations'

https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Help#Web_services

dr.trigon wrote:

I agree - seams to have solved my last issue.

Thanks for the support and clarifications.