I have my own server (Mac OS X Server, i'm on it now it's my main machine).

i have been unable to use drupal because:

to get drupal to do clean urls you must have the htaccess file installed (right?).

i also need to have webdav turned on my site so i can run a small php program called php iCalendar, this is a quite simple program that works right out of the download, all i need to do is point my iCal app to it and turn Webdav on for it.

When I do those two things, have both the Webdav and the htaccess file for drupal running, one knocks out the other, that is, webdav won't won't with that htaccess file in there.
When I turn one off the other works and vice-versa.

If there is ANYONE who would like to help me trouble shoot and possibly fix that please respond. I have tried to solve this before at various boards, including the relevant server boards to NO avail at all.

This is such a shame, I can't believe there is no fix (?).

Anyone?

Thanks in advance.

p.s. if someone with some knowledge is willing to help i will setup a server and let you in to see what is happening, rather, that it IS happening, because i have no idea why it is happening.

Comments

tdailey’s picture

I can help. I have access to some Xserves at the office, I'll try it tomorrow. I'm fairly sure my main server has Webdav and clean URL's on, but I'll check.

Are you running 10.4.4?

jbrauer’s picture

Are you seeing error messages?

Can the two be in separate virtual servers?

I have a OS X (10.4) server with Apple's WebDav implementation turned on and .htaccess working to serve Drupal (4.6 and 4.7) sites with clean URL's. So it can be done.

Another idea might be to move the rewrite rules into the httpd.conf file. I have a different server (OS X 10.3 Client) with many Drupal sites and prefer putting the rewrite rules in the config instead of turning on use of .htaccess files in directories.

-------------------------
Adding Understanding

--

grcm’s picture

You should be able to just use different directories.

E.g you.com for the calendar
and you.com/drupal for the Drupal site.

Then just do a mini htaccess (or edit the calendar's) in the top level to point to the right one.

You probably really don't want your PHP calendar and Drupal sharing the same directory anyway.

Manage documents with The File High Club

dman’s picture

ichiro’s picture

hi everyone who replied

dman wrote: "Just adjust your .htaccess to NOT operate over whatever request or subdirectory you have the other scripts in"

this sounds like the easiest method and leaves my directory hierarchy intact. however, how do i do that exactly?

i'd also like to restate what happens (and no i see error messages). first my dir setup:
/Library/WebServer/mysite --contains all drupal files/folders
/Library/WebServer/mysite/calendar --contains all phpicalendar files/folders

here's what happens when WEBDAV is enabled and i have the standard drupal .htaccess file in ../mysite:

i publish to a private server: http://mysite.net/calendar/calendars

when i do that a vCal (?) file called index.php is created at /Library/WebServer/mysite
when i unsubscribe that file will disappear.

if i remove the drupal .htaccess file iCal publishes the file type (.ics) to the correct folder (../mysite/calendar/calendars).

that is my situation.

???

i'm more than happy to hand over the standard drupal .htaccess file or whatever.

TIA

ichiro

dman’s picture

It's really pretty clear from those previous discussions.
You want to modify the bit in your .htaccess from

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

to

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !^calendar 
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

Webdav MAY be a bit more subtle than what I can tell from your description, but the above change should STOP Drupal from trying to be clever with the contents of your 'calendar' directory.

Your description here, that a /Library/WebServer/mysite/index.php file is being created and deleted on the fly sounds wild.
There's a chance that some other options (from httpd.conf) are also being over-ridden and need to be put back, but I won't guess about that. Chop .htaccess up into bits until you find the bit that's causeing your problem.

.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/

ichiro’s picture

it did not work to change ical publish/unpublish behavior. (also, just to be safe phpicalendar files/dirs are in: /Library/WebServer/mysite/calendar and in that there is dir calendars where cals are pubbed to. drupal files/dirs are in /Library/WebServer/mysite.)

here is my virtual host conf. for that site. as you say, perhaps some edits in here are messed up?

## Default Virtual Host Configuration

<VirtualHost 192.168.1.54:16080>
	ServerName ted.homeip.net
	ServerAdmin admin@example.com
	DocumentRoot "/Library/WebServer/ted-homeip"
	DirectoryIndex index.html index.php
	CustomLog "/var/log/httpd/access_log" "%{PC-Remote-Addr}i %l %u %t \"%r\" %>s %b"
	ErrorLog "/var/log/httpd/error_log"
	ErrorDocument 404 /error.html
	<IfModule mod_ssl.c>
		SSLEngine Off
		SSLLog "/var/log/httpd/ssl_engine_log"
		SSLCertificateFile "/etc/certificates/Default.crt"
		SSLCertificateKeyFile "/etc/certificates/Default.key"
		SSLCipherSuite "ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:!SSLv2:+EXP:+eNULL"
	</IfModule>
	<IfModule mod_dav.c>
		DAVLockDB "/var/run/davlocks/.davlockany_80_default"
		DAVMinTimeout 600
	</IfModule>
	<Directory "/Library/WebServer/ted-homeip">
		Options All -Indexes -ExecCGI -Includes +MultiViews
		<IfModule mod_dav.c>
			DAV On
		</IfModule>
		AllowOverride All
	</Directory>
	<Directory "/Library/WebServer/Documents/calendar">
		AuthName "phpicalendar"
		<Limit PUT DELETE PROPPATCH PROPFIND MKCOL COPY MOVE LOCK UNLOCK>
			Require user  ichi
		</Limit>
		AuthType Basic
	</Directory>
	<IfModule mod_rewrite.c>
		RewriteEngine On
		RewriteCond %{REQUEST_METHOD} ^TRACE
		RewriteRule .* - [F]
	</IfModule>
	<IfModule mod_alias.c>
	</IfModule>
	LogLevel warn
	ServerAlias *
</VirtualHost>

mb above in this Rewrite section should be that line (you gave) or something should be edited out somewhere in here?

ichiro

esmith’s picture

If drupal is installed in the document root and you use clean-URLs, the default rewrite rules can cause some problems.

For example, these should be fine:

http://mysite.tld/drupal/clean_urls_are_not_a_problem
http://mysite.tld/webdav/

But this can cause problems:

http://mysite.tld/clean_urls_rewrite_rule_may_be_a_problem
http://mysite.tld/webdav/

To get around this, I use subdomains like so:

http://mysite.tld/this_is_my_drupal_page
http://icalendar.mysite.tld/webdav

esmith’s picture

addendum: icalendar.mysite.tld would have the webdav folder as its document root, thereby skipping over the drupal .htaccess file altogether.

Also, you could exclude '/webdav' from the .htaccess rewrite rules, which would be easy, but if you use the CVS install, you will have redo it everytime you do an update.

ichiro’s picture

the last paragraph of your addendum is probably what i want.

see, i want one integrated website for my use (meaning using my basic domain addy and not working around problems by creating longer and different sites or urls. i want it all in one spot so to speak with the most basic of addresses, so to speak --ignore that because that is not what i'm looking for input for, per se). i want drupal to be the basis of that (default or index view)... btw, i also have gallery2 in there! ;)

i do not wish to use a separate "domain" or "virtual site" or anything like that, therefore... at this point i would rather my site as i wish and am willing to redo upon updates, which frankly, if it's working how i like i won't be doing! ;-) im repeating myself! d'oh! :-)

maybe i can figure it out, but using the standard drupal htaccess file: how and where do i exclude webdav? please tell me more about that.

thank you VERY much so far and even more if you can solve this for me.

ichiro

esmith’s picture

Read this thread, which dman linked to earlier, Accessing non-Drupal folders in my web space. The answer you are looking for is there. Pay particular attention to chrisd's post. That will tell you how to alter your .htaccess file correctly.

esmith’s picture

I am not sure exactly why you are having the problems you are. If you are in a hurry, you might try creating an Alias in your httpd.conf (see the httpd.conf inline documentation). The big drawback to this is that all domain names on your server will be directed to that directory. Also, if you make an Alias called "calendar", a url like http://example.com/calendar/calendar/ may not work as expected. Also note that we are talking about Apache aliases, which are very different from the regular Mac aliases.

If you are not in a hurry, I could use php iCalendar myself, and I will try to get things working for myself by next weekend.

ichiro’s picture

i will read the items you posted. if you could try it that would be great!

remember i'm on 10.4.7 Server. see my post/reply in this thread for WebServer dir hierarchy, please.

fyi, i have other sites (all virtual, a single IP) on this server, so some solutions are not feasible and others are simply undesirable by me.

i'm no pro but i what mean about aliases (Apache) though i can't exactly create myself without help, but i'm not wanting to do that anyway, as you can see.

this original post by me is quite old. i decided to revisit it yesterday and i got all this help! (some replies might be from previously.)

so thank you all very much,

ichiro

btw... phpicalendar will work straight away. if you have any probs just ask me. perhaps we can chat later if need be.

also, in an above reply by me i said unsubscribe where i should have unpublish. i can also direct to OSX Server phpical setup docs --not to helpful, but if you need. further, the path i posted above for *publishing* an ical is correct (and no trailing "/").

yes what happens is really weird to this observer. :)

ichiro’s picture

i read that thread with special attention to the post you mentioned.

unfortunately, i'm a real lamer (all i do is play music!) on these things --it's taken years of folks holding my hand to get me this far! (thanks iKev)... anyway... if you wouldn't mind i like to either submit to you my .htaccess or maybe you could sue the one available from drupal to actually put in what i need so i *see* exactly what is added and/or edited. i'm just not much of puzzle solver... no matter how easy it is! except that original mac OS one. ;)

thanks... i believe you can email me from here? if you want. it would be great to finally solve this! i had given up! well, obviously not completely!

ichiro

ichiro’s picture

these are (pasted here) are already in the/my .htaccess:
# Rewrite current-style URLs of the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

and i know apache is reading it because if i turn off webdav i can enable clean urls. or likewise if i remove .htaccess phpicalendar using webdav works.

ichiro

ichiro’s picture

sorry but help has died.

i install a fresh Tiger Server,. create a fresh website and vHost, enable WebDav for another site app and Drupal's htaccess/clean urls will not work (one or the other will work independently: WebDav for iCal or Drupal's htaccess)... [see my original issue and its ensuing replies].

ichiro