Last modified by Yana Oksner on 2026/01/08 11:38

From version 57.1
edited by Pascal Robert
on 2012/02/11 08:44
Change comment: Migrated to Confluence 4.0
To version 61.1
edited by karesz
on 2015/10/21 07:27
Change comment: Migrated to Confluence 5.3

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.probert
1 +XWiki.karesz
Content
... ... @@ -13,7 +13,6 @@
13 13  An example mod_expires configuration might look like:
14 14  
15 15  {{code 0="xml"}}
16 -
17 17  <IfModule mod_expires.c>
18 18   ExpiresActive On
19 19   ExpiresDefault A60
... ... @@ -29,7 +29,6 @@
29 29  You will also need the corresponding type-extension mappings:
30 30  
31 31  {{code 0="xml"}}
32 -
33 33  <IfModule mod_mime.c>
34 34   AddType image/bmp bmp
35 35   AddType image/gif gif
... ... @@ -48,7 +48,7 @@
48 48  
49 49  Anyone who has used WebObjects has likely noticed that WebObjects URLs are long [[http:~~/~~/yoursite.com/cgi-bin/WebObjects/AppName.woa/wa/something>>url:http://yoursite.com/cgi-bin/WebObjects/AppName.woa/wa/something||shape="rect"]]{{code language="none"}}{{/code}}. It is a common request to make these URLs nicer for end-users who are used to just requesting [[http:~~/~~/yoursite.com>>url:http://yoursite.com||shape="rect"]]{{code language="none"}}{{/code}}. Fortunately Apache provides an amazingly extensive module called "mod_rewrite" that allows you to rewrite the URL requests of your site based on a series of regular expressions and rules.
50 50  
51 -Aaron Rosenzweig has a very thorough article about [[using mod_rewrite with Apache>>url:http://www.jewelryluv.com/fashion/pageWithName/ModRewrite/||shape="rect"]].
49 +Aaron Rosenzweig has a very thorough article about [[using mod_rewrite with Apache>>url:http://web.archive.org/web/20051216205025/http://www.jewelryluv.com/fashion/pageWithName/ModRewrite/||shape="rect"]][[.>>url:http://www.jewelryluv.com/fashion/pageWithName/ModRewrite/||shape="rect"]]
52 52  
53 53  === mod_rewrite with mod_webobjects ===
54 54  
... ... @@ -57,7 +57,6 @@
57 57  So in http.conf, search for mod_rewrite and change it to:
58 58  
59 59  {{noformat}}
60 -
61 61  LoadModule WebObjects_module /System/Library/WebObjects/Adaptors/Apache/mod_WebObjects.so
62 62  LoadModule rewrite_module libexec/httpd/mod_rewrite.so
63 63  
... ... @@ -66,7 +66,6 @@
66 66  , find again:
67 67  
68 68  {{noformat}}
69 -
70 70  AddModule mod_WebObjects.c
71 71  AddModule mod_rewrite.c
72 72  
... ... @@ -79,7 +79,6 @@
79 79  Here's an example mod_rewrite we use on one of our apps:
80 80  
81 81  {{code 0="xml"}}
82 -
83 83  <IfModule mod_rewrite.c>
84 84   RewriteEngine On
85 85   RewriteRule ^/$ /page/HomePage [R]
... ... @@ -115,7 +115,6 @@
115 115  The new default configuration is:
116 116  
117 117  {{code 0="xml"}}
118 -
119 119  <Directory />
120 120   Options FollowSymLinks
121 121   AllowOverride None
... ... @@ -130,10 +130,9 @@
130 130  And, of course, either change the name of the WebObjectsAlias setting from /cgi-bin/WebObjects to <foo>/WebObjects or comment out the ScriptAlias definition for the /cgi-bin/ directory.
131 131  
132 132  {{info title="Note"}}
133 -The default {{code language="none"}}ScriptAlias{{/code}} directive in the 10.5 and 10.6 {{code language="none"}}httpd.conf{{/code}} files is:\\
127 +The default {{code language="none"}}ScriptAlias{{/code}} directive in the 10.5 and 10.6 {{code language="none"}}httpd.conf{{/code}} files is:
134 134  
135 135  {{noformat}}
136 -
137 137  ScriptAliasMatch ^/cgi-bin/((?!(?i:webobjects)).*$) "/Library/WebServer/CGI-Executables/$1"
138 138  
139 139  {{/noformat}}
... ... @@ -157,15 +157,44 @@
157 157  
158 158  Enjoy your shiny new WO adaptor.
159 159  
160 -* Note: if you are getting the error
153 +* (((
154 +Note: if you are getting the error
161 161  
162 162  {{noformat}}
163 -
164 164  libtool: compile: unable to infer tagged configuration
165 165  libtool: compile: specify a tag with `--tag'
166 166  apxs:Error: Command failed with rc=65536
167 167  
168 168  {{/noformat}}
162 +)))
169 169  
170 170  Add to the end of your make.config the following:
171 171   {{code language="none"}}CC = gcc{{/code}}
166 +
167 +== Webobjects Adaptor for Apache 2.4 ==
168 +
169 +=== Access control ===
170 +
171 +Check out [[http:~~/~~/httpd.apache.org/docs/2.4/upgrading.html#access>>url:http://httpd.apache.org/docs/2.4/upgrading.html#access||shape="rect"]]
172 +
173 +In 2.2, access control based on client hostname, IP address, and other characteristics of client requests was done using the directives [[Order>>url:http://httpd.apache.org/docs/2.4/mod/mod_access_compat.html#order||shape="rect"]]{{code language="none"}}{{/code}}, [[Allow>>url:http://httpd.apache.org/docs/2.4/mod/mod_access_compat.html#allow||shape="rect"]]{{code language="none"}}{{/code}}, [[Deny>>url:http://httpd.apache.org/docs/2.4/mod/mod_access_compat.html#deny||shape="rect"]]{{code language="none"}}{{/code}}, and [[Satisfy>>url:http://httpd.apache.org/docs/2.4/mod/mod_access_compat.html#satisfy||shape="rect"]]{{code language="none"}}{{/code}}.
174 +
175 +In 2.4, such access control is done in the same way as other authorization checks, using the new module [[mod_authz_host>>url:http://httpd.apache.org/docs/2.4/mod/mod_authz_host.html||shape="rect"]]{{code language="none"}}{{/code}}. The old access control idioms should be replaced by the new authentication mechanisms, although for compatibility with old configurations, the new module [[mod_access_compat>>url:http://httpd.apache.org/docs/2.4/mod/mod_access_compat.html||shape="rect"]]{{code language="none"}}{{/code}} is provided.
176 +
177 +==== 2.2 configuration: ====
178 +
179 +{{code}}
180 +<Location /cgi-bin/WebObjects/>
181 + Order allow,deny
182 + Allow from all
183 +</Location>
184 +{{/code}}
185 +
186 +====
187 +2.4 configuration: ====
188 +
189 +{{code}}
190 +<Location /cgi-bin/WebObjects/>
191 + Require all granted
192 +</Location>
193 +{{/code}}