• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Need help with Tiger, WO and mod_rewrite
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need help with Tiger, WO and mod_rewrite


  • Subject: Re: Need help with Tiger, WO and mod_rewrite
  • From: Dev WO <email@hidden>
  • Date: Fri, 12 Aug 2005 12:54:55 +0200

As a follow-up on the issue, adding the line
RewriteRule ^/$ /cgi-bin/WebObjects/Site [PT,L]
brought a major issue:
The websites aren't accessible anymore using webDAV?!
So back to the starting point.

Could you explain what this line is actually doing/why I need it?
Because I really don't understand why it is even executed:(
just a recap of the conf file for the site:
-------
<VirtualHost IP:80>
ServerName www.site.com
ServerAdmin email@hidden
DocumentRoot "/Library/WebServer/Documents/www.site.com"
DirectoryIndex index.html
CustomLog "/var/log/httpd/access_site_log" combined
ErrorLog "/var/log/httpd/error_log"
ErrorDocument 404 /error.html
ServerAlias site.com
<IfModule mod_ssl.c>
SSLEngine Off
SSLLog "/var/log/httpd/ssl_engine_log"
SSLCertificateChainFile "/etc/httpd/ssl.crt/ca.crtX"
SSLCertificateFile "/etc/httpd/ssl.crt/server.crtX"
SSLCertificateKeyFile "/etc/httpd/ssl.key/server.keyX"
SSLCipherSuite "ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:! SSLv2:+EXP:+eNULL"
</IfModule>
<IfModule mod_dav.c>
DAVLockDB "/var/run/davlocks/.davlock100"
DAVMinTimeout 600
</IfModule>
<Directory "/Library/WebServer/Documents/www.site.com">
Options All -Indexes +MultiViews -Includes -ExecCGI
AuthName "www.site.com"
<Limit PUT DELETE PROPPATCH PROPFIND MKCOL COPY MOVE LOCK UNLOCK>
Require user stephanemorin_tcsmacs ephiraymond_tcsmacs
Require group tcsmacsnet site
</Limit>
<IfModule mod_dav.c>
DAV On
</IfModule>
AuthType Basic
AllowOverride None
</Directory>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
RewriteCond %{HTTP_HOST} !^www.site.com [NC]
RewriteCond %{HTTP_HOST} !^$
## The line that break WebDAV
RewriteRule ^/(.*) http://www.site.com/ [L,R]
RewriteRule ^/$ /cgi-bin/WebObjects/siteFO [L,PT]
RewriteRule ^/index\.html$ /cgi-bin/WebObjects/ siteFO [L,PT]
RewriteRule ^(/images/.*)$ $1 [L,PT,NS]
RewriteRule ^(/css/.*)$ $1 [L,PT,NS]
RewriteRule ^(/js/.*)$ $1 [L,PT,NS]
RewriteRule ^(/favicon.ico)$ $1 [L,PT,NS]
</IfModule>
<IfModule mod_alias.c>
</IfModule>
LogLevel warn
</VirtualHost>
-------


Xavier



In fact, it wasn't the -indexes, but the -Include which was in fault


But I still don't understand why I had to add Johan's line...




Hi Chuck:)
so I've got the -Indexes inside the virtual host, but if I remove it, I got the files listed...
but with the tip of Johan:
RewriteRule ^/$ /cgi-bin/WebObjects/Site [PT,L]


it is working:)


But I don't understand why it wasn't working anymore.... really QA at Apple isn't the quality we should expect...

Thanks a lot to both of you, I'll correct all the site files and try to get back home...
I'll try to fix the mail server and most probably other problem with WOFile uploading on sunday...


Xavier





On Aug 5, 2005, at 3:34 PM, Dev WO wrote:



And even with apache debug log, I only get:
"Directory index forbidden by rule"





Do you have a Directory directive in the virutal host / server config:

        <Directory "/Users/somebody/DocumentRoot">
                Options All -Indexes +ExecCGI +MultiViews

-Indexes here might be giving you the problem.

                <IfModule mod_dav.c>
                        DAV Off
                </IfModule>
                AllowOverride None
                <IfModule mod_expires.c>
                    ExpiresActive on
               </IfModule>
        </Directory>


Also, try not calling it index.html but home.html or some other name.



Just guessing Chuck





Hi Xavier,

This is the httpd.conf file.

<httpd.conf>

There are no RewriteRule's are in this file, those are in various site files as there are different rules for each domain (e.g. RewriteRule ^/$ /cgi-bin/WebObjects/Test [PT,L] )

Johan

6 aug 2005 kl. 00.04 skrev Dev WO:
Hi Johan
I've got that actually....
do you mind sending me your httpd.conf file?
so I could check for differences between the 2....I'm really going crazy:( it's midnight here and I'm going to miss the last bus...
sad day


no Thanks to Apple




I had similar trouble when moving to a Tiger server, but managed to solve it.


After lots of trial and error, I ended up with just one added line in the apache config, in addition to moving the WebObjects Include above the LoadModules, as described on Rentzsch's blog.

What I needed to to was to add:

    AddModule mod_WebObjects.c

just before

    AddModule mod_rewrite.c

Then the rewrites of arbitrary URLs to /cgi-bin/WebObjects/... worked again.

Johan

5 aug 2005 kl. 23.04 skrev Dev WO:
Hi list,
I know this should be either on the server mailing list or the deployment mailing list, but I posted to the server and my email didn't even display in the list! Might be a problem with the new mail setup...


So as I'm really into trouble, maybe someone could help:

I've upgraded my server (10.3 fully updated and permission repaired) to Tiger (10.4.2 from 10.4) and I'm having a major problem with my WebObjects applications, apache and mod_rewrite:
I check the sites files and they didn't change (worked before the update).
When I try to connect to www.site.com, I have a rewrite rule that hide the /cgi-... and provide the WO application
This was done by telling apache to load index.html as the default page, then rewrite to WO.
But now, I got a permission error in my web browser!!!
And if I type directly www.site.com/index.html, everything is OK!


I checked the authorization on the site.com and it is 775 on it...

Anyone has such rewrite rule to hide the starting url?

Thanks a lot for your help, I really need it:(

Xavier

PS: I saw the bug concerning the configuration file, so I uncommented the "Include /System/Library/Web..." line and paste it above the load of mod_rewrite (like Rentzsch's blog).



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net


This email sent to email@hidden



--
Practical WebObjects - a book for intermediate WebObjects developers who want to increase their overall knowledge of WebObjects, or those who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects









_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40anazys.com


This email sent to email@hidden







_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Need help with Tiger, WO and mod_rewrite (From: Dev WO <email@hidden>)
 >Re: Need help with Tiger, WO and mod_rewrite (From: Johan Carlberg <email@hidden>)
 >Re: Need help with Tiger, WO and mod_rewrite (From: Dev WO <email@hidden>)
 >Re: Need help with Tiger, WO and mod_rewrite (From: Dev WO <email@hidden>)
 >Re: Need help with Tiger, WO and mod_rewrite (From: Chuck Hill <email@hidden>)
 >Re: Need help with Tiger, WO and mod_rewrite (From: Dev WO <email@hidden>)
 >Re: Need help with Tiger, WO and mod_rewrite (From: Dev WO <email@hidden>)

  • Prev by Date: Re: Object gets empty value, womp
  • Next by Date: PostgreSQLPlugIn.framework
  • Previous by thread: Re: Need help with Tiger, WO and mod_rewrite
  • Next by thread: onChange with WOPopUpButton
  • Index(es):
    • Date
    • Thread