Apaches
(→One, to test a change) |
(→All) |
||
| Line 1: | Line 1: | ||
__TOC__ | __TOC__ | ||
==Restarting== | ==Restarting== | ||
| − | |||
| − | |||
| − | |||
Revision as of 08:18, 12 June 2005
Contents |
Restarting
Restarting httpd
If httpd is broken, sudo apache-restart to restart a single httpd. Use dsh to apply it to all. If you get hundreds of instances counted by ps aux|grep httpd|wc -l and the server is having problems you might need to do this.
Starting load-balancing ICPAgent
This is started automatically when the computer restarts and is necessary for the Apache to take any work. To start:
- use /usr/local/bin/icpagent, has the right timings for each host
Logging
Text output on stderr from various external commands, as well as some apache errors, are in /apache/logs/error_log on each server. PHP errors are in /apache/logs/php-errors . Most apache error messages, such as file not found errors, are in hostname-error_log, for example /apache/logs/en.wikipedia.org-error_log .
Apache access logs are mostly disabled. Webalizer statistics are made using the squids logs instead.
Apache setup checklist
automated procedure
New apache deployments (on FC3) may be done with deployment scripts. Before you do anything, please add DNS entries and set up NFS ACLs. Then:
mount 10.0.0.4:/home /home cd /home/wikipedia/deployment/apache sh prepare-host reboot
Hey, yeah, you've got a running apache with all checklists below executed...
main apache farm
- Install apt-get
- Add server to export lists at zwinger:/etc/exports and yongle:/etc/exports
- Update fstab, mount file systems
- install apache from /home/wikipedia/src/apache_1.3.33
- doesn't work on ariel
- install PHP from /home/wikipedia/src/php/php-4.3.10 (is this the right version? yes)
- doesn't work on ariel
- how to setup Turck MMcache?
- /home/wikipedia/src/turck (choose the right version for the php)
- tex, tidy, imagemagick: apt-get install tetex*
apt-get install ImageMagick tetex tetex-latex tetex-fonts tetex-dvips tidy libtidy sendmail-cf
- for EasyTimeline, install ploticus: scp /usr/local/bin/pl from one of the other machines to /usr/local/bin/
- sudo
- configure sendmail
- in /etc/mail/sendmail.mc, set
define(`SMART_HOST',`smtp.pmtpa.wmnet')
- in /etc/mail, call make
- database permissions
- Add the host to maintenance/ourusers.php
- Run the file and source the resulting SQL as root
- add hostname to appropriate files in /usr/local/dsh/node_groups/ on zwinger
- ganglia
ln -sf /home/wikipedia/gmond/internal_apache.conf /etc/gmond.conf
- ICPAgent:
- scp zwinger:/usr/local/bin/icpagent /usr/local/bin
- add /usr/local/bin/icpagent to /etc/rc.local
- possibly adjust the weight in /usr/local/bin/icpagent a bit if the default (5.0) isn't right
download.wikimedia.org etc
- currently on zwinger
Test cases
Here are some test cases you can use to test the apache configuration after changing something.
GET /wiki/Foo HTTP/1.1 Host: en.wikipedia.org GET /wiki/Foo HTTP/1.1 Host: www.wikipedia.org GET / HTTP/1.1 Host: en2.wikipedia.org GET /wiki/Main_Page HTTP/1.1 Host: www.wikipedia.com GET / HTTP/1.1 Host: wikipedia.com GET / HTTP/1.1 Host: wikibooks.org GET / HTTP/1.1 Host: wikiquote.org GET / HTTP/1.1 Host: dk.wikipedia.org GET / HTTP/1.1 Host: foo.wikipedia.org GET /wiki/Main_Page HTTP/1.1 Host: test.wikipedia.org GET / HTTP/1.1 Host: webshop.wikipedia.org GET / HTTP/1.1 Host: boards.wikimedia.org GET /wiki/Foo HTTP/1.1 Host: en.wikipedia.org User-Agent: Exalead GET /wiki/Foo HTTP/1.1 Host: meta.wikimedia.org GET / HTTP/1.1 Host: en.wiktionary.org