WebServer » History » Version 2
Anonymous, 10/01/2007 01:24 PM
Add ''/usr/local/bin'' to search path for apache
1 | 1 | Anonymous | = Web Server Configuration = |
---|---|---|---|
2 | 1 | Anonymous | Make the following changes to the Apache configuration file (''/etc/httpd/conf/httpd.conf''): |
3 | 1 | Anonymous | {{{ |
4 | 1 | Anonymous | User procksi |
5 | 1 | Anonymous | Group procksi |
6 | 1 | Anonymous | ServerAdmin procksi@cs.nott.ac.uk |
7 | 1 | Anonymous | ServerName procksi.cs.nott.ac.uk |
8 | 1 | Anonymous | DocumentRoot /home/procksi/latest/html |
9 | 1 | Anonymous | <Directory /home/procksi/latest/html"> |
10 | 1 | Anonymous | AllowOverride AuthConfig |
11 | 1 | Anonymous | </Directory> |
12 | 1 | Anonymous | LogFormat "%t %h %l %u \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined |
13 | 1 | Anonymous | LogFormat "%t %h %l %u \"%r\" %>s %b" common |
14 | 1 | Anonymous | LogFormat "%t %{Referer}i -> %U" referer |
15 | 1 | Anonymous | LogFormat "%t %{User-agent}i" agent |
16 | 1 | Anonymous | |
17 | 1 | Anonymous | #Exclude Logging of Ganglia Requests |
18 | 1 | Anonymous | SetEnvIf Request_URI "ganglia" ganglia |
19 | 1 | Anonymous | |
20 | 1 | Anonymous | # |
21 | 1 | Anonymous | # The location and format of the access logfile (Common Logfile Format). |
22 | 1 | Anonymous | # If you do not define any access logfiles within a <VirtualHost> |
23 | 1 | Anonymous | # container, they will be logged here. Contrariwise, if you *do* |
24 | 1 | Anonymous | # define per-<VirtualHost> access logfiles, transactions will be |
25 | 1 | Anonymous | # logged therein and *not* in this file. |
26 | 1 | Anonymous | # |
27 | 1 | Anonymous | |
28 | 1 | Anonymous | CustomLog /home/procksi/latest/logs/access.log common env=!ganglia |
29 | 1 | Anonymous | |
30 | 1 | Anonymous | # |
31 | 1 | Anonymous | # If you would like to have agent and referer logfiles, uncomment the |
32 | 1 | Anonymous | # following directives. |
33 | 1 | Anonymous | # |
34 | 1 | Anonymous | |
35 | 1 | Anonymous | CustomLog /home/procksi/latest/logs/referer.log referer env=!ganglia |
36 | 1 | Anonymous | CustomLog /home/procksi/latest/logs/agent.log agent env=!ganglia |
37 | 1 | Anonymous | |
38 | 1 | Anonymous | # |
39 | 1 | Anonymous | # For a single logfile with access, agent, and referer information |
40 | 1 | Anonymous | # (Combined Logfile Format), use the following directive: |
41 | 1 | Anonymous | # |
42 | 1 | Anonymous | #CustomLog logs/access_log combined env=!ganglia |
43 | 1 | Anonymous | |
44 | 1 | Anonymous | ScriptAlias /cgi-bin/ /home/procksi/latest/cgi-bin/ |
45 | 1 | Anonymous | |
46 | 1 | Anonymous | <Directory "/home/procksi/latest/cgi-bin"> |
47 | 1 | Anonymous | AllowOverride None |
48 | 1 | Anonymous | Options None |
49 | 1 | Anonymous | Order allow,deny |
50 | 1 | Anonymous | Allow from all |
51 | 1 | Anonymous | </Directory> |
52 | 1 | Anonymous | |
53 | 1 | Anonymous | Alias /data/ /home/procksi/latest/data/ |
54 | 1 | Anonymous | Alias /images/ /home/procksi/latest/images/ |
55 | 1 | Anonymous | Alias /styles/ /home/procksi/latest/styles/ |
56 | 1 | Anonymous | Alias /applets/ /home/procksi/latest/applets/ |
57 | 1 | Anonymous | Alias /scripts/ /home/procksi/latest/scripts/ |
58 | 1 | Anonymous | Alias /ganglia/ /usr/local/ganglia/html/ |
59 | 1 | Anonymous | |
60 | 1 | Anonymous | #Redirection |
61 | 1 | Anonymous | Redirect /trac https://psiren.cs.nott.ac.uk/projects/procksi/ |
62 | 1 | Anonymous | |
63 | 1 | Anonymous | AddLanguage de .de |
64 | 1 | Anonymous | AddLanguage en .en |
65 | 1 | Anonymous | AddLanguage es .es |
66 | 1 | Anonymous | AddLanguage fr .fr |
67 | 1 | Anonymous | LanguagePriority en es de fr |
68 | 1 | Anonymous | |
69 | 1 | Anonymous | Alias /errordocs/ "/home/procksi/errordocs" |
70 | 1 | Anonymous | <IfModule mod_negotiation.c> |
71 | 1 | Anonymous | <IfModule mod_include.c> |
72 | 1 | Anonymous | <Directory /home/procksi/errordocs> |
73 | 1 | Anonymous | AllowOverride none |
74 | 1 | Anonymous | Options MultiViews IncludesNoExec FollowSymLinks |
75 | 1 | Anonymous | AddType text/html .shtml |
76 | 1 | Anonymous | <FilesMatch "\.shtml[.$]"> |
77 | 1 | Anonymous | SetOutputFilter INCLUDES |
78 | 1 | Anonymous | </FilesMatch> |
79 | 1 | Anonymous | </Directory> |
80 | 1 | Anonymous | |
81 | 1 | Anonymous | ErrorDocument 400 /errordocs/400_BAD_REQUEST |
82 | 1 | Anonymous | ErrorDocument 401 /errordocs/401_UNAUTHORIZED |
83 | 1 | Anonymous | ErrorDocument 403 /errordocs/403_FORBIDDEN |
84 | 1 | Anonymous | ErrorDocument 404 /errordocs/404_NOT_FOUND |
85 | 1 | Anonymous | ErrorDocument 405 /errordocs/405_METHOD_NOT_ALLOWED |
86 | 1 | Anonymous | ErrorDocument 406 /errordocs/406_NOT_ACCEPTABLE |
87 | 1 | Anonymous | ErrorDocument 408 /errordocs/408_REQUEST_TIMEOUT |
88 | 1 | Anonymous | ErrorDocument 410 /errordocs/410_GONE |
89 | 1 | Anonymous | ErrorDocument 411 /errordocs/411_LENGTH_REQUIRED |
90 | 1 | Anonymous | ErrorDocument 412 /errordocs/412_PRECONDITION_FAILED |
91 | 1 | Anonymous | ErrorDocument 413 /errordocs/413_REQUEST_ENTITY_TOO_LARGE |
92 | 1 | Anonymous | ErrorDocument 414 /errordocs/414_REQUEST_URI_TOO_LARGE |
93 | 1 | Anonymous | ErrorDocument 415 /errordocs/415_UNSUPPORTED_MEDIA_TYPE |
94 | 1 | Anonymous | ErrorDocument 500 /errordocs/500_INTERNAL_SERVER_ERROR |
95 | 1 | Anonymous | ErrorDocument 501 /errordocs/501_NOT_IMPLEMENTED |
96 | 1 | Anonymous | ErrorDocument 502 /errordocs/502_BAD_GATEWAY |
97 | 1 | Anonymous | ErrorDocument 503 /errordocs/503_SERVICE_UNAVAILABLE |
98 | 1 | Anonymous | ErrorDocument 506 /errordocs/506_VARIANT_ALSO_VARIES |
99 | 1 | Anonymous | </IfModule> |
100 | 1 | Anonymous | </IfModule> |
101 | 1 | Anonymous | |
102 | 1 | Anonymous | <Location /server-status> |
103 | 1 | Anonymous | SetHandler server-status |
104 | 1 | Anonymous | Order deny,allow |
105 | 1 | Anonymous | Deny from all |
106 | 1 | Anonymous | Allow from .cs.nott.ac.uk |
107 | 1 | Anonymous | </Location> |
108 | 1 | Anonymous | |
109 | 1 | Anonymous | <Location /server-info> |
110 | 1 | Anonymous | SetHandler server-info |
111 | 1 | Anonymous | Order deny,allow |
112 | 1 | Anonymous | Deny from all |
113 | 1 | Anonymous | Allow from .cs.nott.ac.uk |
114 | 1 | Anonymous | </Location> |
115 | 1 | Anonymous | }}} |
116 | 1 | Anonymous | |
117 | 2 | Anonymous | * Add search path for programs. Modify ''/etc/init.d/httpd'' to read: |
118 | 2 | Anonymous | {{{ |
119 | 2 | Anonymous | RETVAL=0 |
120 | 2 | Anonymous | PATH="$PATH:/usr/local/bin" |
121 | 2 | Anonymous | }}} |
122 | 2 | Anonymous | |
123 | 1 | Anonymous | |
124 | 1 | Anonymous | * Make the apache daemon start at bootup. Enter at the command line of the master node: |
125 | 1 | Anonymous | {{{ |
126 | 1 | Anonymous | /sbin/chkconfig --add httpd |
127 | 1 | Anonymous | /sbin/chkconfig httpd on |
128 | 1 | Anonymous | }}} |
129 | 1 | Anonymous | |
130 | 1 | Anonymous | * Start the apache daemon. Enter at the command line of the master node: |
131 | 1 | Anonymous | {{{ |
132 | 1 | Anonymous | /sbin/service httpd restart |
133 | 1 | Anonymous | }}} |