The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   UNIX - Newcomers (http://hintsforums.macworld.com/forumdisplay.php?f=15)
-   -   WebDAV (http://hintsforums.macworld.com/showthread.php?t=6364)

g4macuser 10-13-2002 12:20 PM

WebDAV
 
i want to enable/install WebDAV on my machine. i have downloaded mod_dav-1.0.3-1.3.6 which i think from my lookings in the apache manual needs to be install for web WebDAV. i know nothing about unix. i figured it would be an install package but it seems i have to use the terminal window to do the install and i don't understand what i am to do. i am comfortable using the terminal but only if i am sure of what i am doing. any help would be appreciated. my goal is to be able to publish ical calendars to the sites folder of my user folder. my next question is would publishing them to my own site and then accessing them via a web browser make the icals to turn up as they did in the macworld ny keynote by steve jobs.

carl 10-18-2002 08:38 AM

If you're using Jaguar (I'm guessing you are since you are running iCal), WebDAV is already installed and almost ready to go.

Look here for the low down ...

http://www.gregwestin.com/webdav_for_ical.php.

If you have any problems following the instructions, which you might well do as I'm sure it's aimed at beginners, post another message here and we'll see what we can do to help you!

ericw13 10-18-2002 09:47 AM

From a terminal session, edit your apache config file...

cd /etc/httpd

open httpd.conf with your favorite editor (use sudo which prompts for your admin passwd and runs the process as root, as only the admin/root user can edit this file).

If you aren't used to unix command line editing, use pico:

sudo pico httpd.conf

Find the line that looks like

#LoadModule dav_module libexec/httpd/libdav.so

type ctrl-w LoadModule dav (ctrl-w is a search, as listed in the help at the bottom of the terminal window)

remove the leading # (a comment delimter)

Find the line that looks like

#AddModule mod_dav.c

and remove the leading #

Now find the section that begins with

<IfModule alias.c>

Backup and put the following right above it:

<IfModule mod_dav.c>
<Directory /Library/WebServer/Documents/ical>
DAV On
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
</IfModule>

save your work (ctrl-o, enter) and exit (ctrl-x).

Next,

cd /Library/WebServer/Documents
sudo mkdir ical
sudo chown www:www ical

(here, www:www matches the User and Group directives in the httpd.conf file. If you have apache running as a different user or group, change the sudo chown command accordingly.)

Finally, open System Preferences, click on Sharing and stop, then restart, Personal Web Sharing.

You can test this by opening ical, then publishing a calendar to a web site...

http://localhost/ical

as it is setup, user and passwd are not required.

For more on security, check out http://www.webdav.org/mod_dav/install.html#apache

Hope this helps
Eric

marquez 12-16-2002 01:42 AM

secure webdav server
 
hopefully relevant to this discussion:

I have been trying unsuccessfully to use ssh port forwarding to securely synchronize my iCal files to my webdav server.

I changed the line #Listen in /etc/httpd/httpd.conf to run the web server on port 8084:
#Listen 8084

I restarted the web server and connected via a browser to the new port to test this configuration.

Then I started ssh to my machine and forwarded this port:

ssh marquez@machine -L 8084:machine:8084

and then connected to http://localhost:8084/dav/ and was able to see my ics files as expected.

The problem is that when I loaded iCal and published my files to http://localhost:8084/dav/, the synchronization process would go on forever with 100% CPU utilization. I could only kill iCal at this point.

connecting to the webdav server in the finder poses no problems through this tunnel.

Any ideas on how to fix this?

below 01-22-2003 11:01 AM

Connceting to WebDAV as a server
 
Hm, my WebDAV servers iCals nicely, I wondered if I could connect to it like iDisk. But no success.

Entering http://below.groof.com/dav does not bring up the password box. Using iCal to publish or subscribe to a calendar there works nicely, and by just opening the URL in a browser you get read access.

Any ideas?
The WebDAV is running on an apache debian server, but it seems that Macies are most knowledgable about WebDAV in general.

Alex

macitect 11-29-2004 12:39 PM

ericw13,

I realize that this thread is really old, but I hope this comes to your attention...

I just followed your instructions to install the WebDav module on apache. It works - and thanks, your instructions were clear and easy even for a novice like me.

I am having a problem now, though and want to know if you can help. iCal is not allowing me to publish the calendars... it keeps giving me a message like:
Error: Calendar could not be published
Access to the file is forbidden by server.
Please check URL.


I have tried http://localhost/ical and my web address http://www.macitect.dnsalias.com/ical and both give me the same message.

My permissions are set as follows: -rw-r--r--

Do you know what I am doing wrong?
Thanks in advance

macitect

macitect 11-29-2004 01:08 PM

ical publish problem
 
ericw13,

I know that this thread is quite old, but i hope that this finds its way to your attention...

I just configured my apache server to be webdav enabled, thanks to your instructions. (btw your instructions were super clear and easy even for a novice like me! THANKS)

Anyhow i am having a problem which I hope you can help resolve. iCal will not let me publish to the site. I keep getting the following error message:
Error: Calendar could not be published
Access to the file is forbidden by server.
Please check URL.


I have tried http://localhost/ical and my own website address http://www.macitect.dnsalias.com/~derek/ and always get the same message. The permissions are set to -rw-r--r-- (the same as my httpd.conf).
Can you tell what is wrong here?

Thanks very much,
macitect

ezmobius 11-30-2004 01:22 PM

I think you have a permission problem -rw-r--r-- will not let you write to the file. Try to change the permissions to 755 and see how that works.
chmod 755 nameoffile

macitect 11-30-2004 02:23 PM

thanks for the advice...
 
i would really like to try out your advice right now, but i am at my university. i can mount my home volume via the finder, but can you tell me how to access via the terminal? in /volumes i see that there is Macintosh HD adn Macintosh HD-1. when i try to cd to one of them it tells me there is no such directory.

otherwise is there another way to change the permissions of that folder remotely?

thanks again.
macitect

ezmobius 11-30-2004 02:28 PM

Since you can remotely mount your home folder from the finder at your university, I'm going to assume that you know your ip address at home. If you do then you can access your machine from the terminal in the following manner:
ssh -l username 192.168.0.1

Now replace username with your username ON YOUR HOME COMPUTER and replace 192.168.0.1 with your home computers ip address. After you run the command it will ask for the password of your home computer. If successfule you will be VIRTUALLY in a terminal session on your home computer, so cd to whatever directory you need to and do the chmod right there. When you are done working on your home machine, type exit to be dumped back into your local terminal session.

macitect 12-01-2004 12:07 AM

forgive the novice...
 
ezmobius,

thanks again for all the help. ok i tried changing the file from both school and then home. it worked, meaning that the permissions were indeed changed (i checked in the 'get info' option from finder). Unfortunately still no luck.

However, I found this when trying to restart Apache:
[derek-siemenss-Computer:/library/webserver/documents] derek% apachectl restart
/usr/sbin/apachectl restart: httpd not running, trying to start
Processing config directory: /private/etc/httpd/users/*.conf
Processing config file: /private/etc/httpd/users/derek.conf
fopen: Permission denied
httpd: could not open error log file /private/var/log/httpd/error_log.
/usr/sbin/apachectl restart: httpd could not be started


My server seems to be running alright, and it shuts down and starts up from the Sys Prefs pane, but I was wondering if this may direct to some problem i may have inadvertently created. The only terminal work I have tried on Apache before was creating an .htaccess for some files with pictures of my son.

Any other suggestions?
Thanks so much for your guidance!!

cheers,
macitect

ezmobius 12-01-2004 12:59 AM

Quote:

[derek-siemenss-Computer:/library/webserver/documents] derek% apachectl restart
/usr/sbin/apachectl restart: httpd not running, trying to start
Processing config directory: /private/etc/httpd/users/*.conf
Processing config file: /private/etc/httpd/users/derek.conf
fopen: Permission denied
httpd: could not open error log file /private/var/log/httpd/error_log.
/usr/sbin/apachectl restart: httpd could not be started
It looks like your having permission problems with your error log. Try to do a repair permissions with disk utility and then restart apache to see if you get the same error message. Instead of doing an apachectl restart try doing apachectl gracefull(sp?1 or 2 l's). This is a 'nicer' way of restarting apache without killing any currently active server processes. Now if you still get the same permissions error try to chmod 777 /private/var/log/httpd/error_log . And then apachectl graceful . If this doesn't clear up your problem then post back again and I'll try to pinpoint the problem for you.

macitect 12-01-2004 10:19 AM

no luck...
 
Here I am posting back...
I followed your instructions and still no luck. here is what I got in Terminal (after already doing the disk repairs):

Last login: Wed Dec 1 07:01:01 on console
Welcome to Darwin!
[derek-siemenss-Computer:~] derek% apachectl graceful
/usr/sbin/apachectl graceful: httpd not running, trying to start
Processing config directory: /private/etc/httpd/users/*.conf
Processing config file: /private/etc/httpd/users/derek.conf
fopen: Permission denied
httpd: could not open error log file /private/var/log/httpd/error_log.
/usr/sbin/apachectl graceful: httpd could not be started
[derek-siemenss-Computer:~] derek% sudo chmod 777 /private/var/log/httpd/error_log
Password:
[derek-siemenss-Computer:~] derek% apachectl graceful
/usr/sbin/apachectl graceful: httpd not running, trying to start
Processing config directory: /private/etc/httpd/users/*.conf
Processing config file: /private/etc/httpd/users/derek.conf
/usr/sbin/apachectl graceful: httpd could not be started
[derek-siemenss-Computer:~] derek%


like i may have already stated i am really new (in fact just beginning to learn) at UNIX. I really appreciate your help!!

cheers
macitect

macitect 12-01-2004 10:30 AM

one other thing...
 
I just tried placing an ical folder in my ~/sites/ folder and the response from ical when trying to publish my calendar is that 'this access has been forbidden by server'.

i just thought this might give more hints in trying to pinpoint the problem.

ezmobius 12-01-2004 11:17 AM

Hey there macitect-
You know, I've never done anything with webdav so I'm not very familiar with publishing ical calendars. I am however exxperienced at apache and unix stuff. In an earlier post you said that even though you get errors with apachctl that you can still stop and start apache with the sys pref pane? Is this correct? The next step here might be, if your so inclined, is to email me a copy of your httpd.conf file so I can see if I can find any errors. ezra@yakima-herald.com

macitect 12-01-2004 12:13 PM

at school...
 
i am currently at school and my home computer is refusing me access. here is what it shows me:
ssh: connect to host macitect.dnsalias.com port 22: Connection refused

i will forward the httpd.conf file as soon as i gain access or get home.

cheers

myrkr 06-20-2005 06:47 PM

i have been having similar problems. i actually did a full reinstall of tiger and it worked until i edited the "httpd.conf" file to enable php, and restarted using "apachectl graceful". i went back through now and the permisions corrections didnt do anything.

i tried "sudo chmod 777 /private/var/log/httpd/error_log"

(
apachectl start
Processing config directory: /private/etc/httpd/users/*.conf
Processing config file: /private/etc/httpd/users/itimac.conf
Processing config file: /private/etc/httpd/users/myrkr.conf
fopen: Permission denied
httpd: could not open error log file /private/var/log/httpd/error_log.
/usr/sbin/apachectl start: httpd could not be started
)

then checked the error log

(
[error] (13)Permission denied: could not open transfer log file /private/var/log/httpd/access_log."
).

then i tried "sudo chmod 777 /private/var/log/httpd/access_log"
then "apachectl start" and it says that it starts but it does not.
the system control panel "personal web sharing" doesnot start it either. it sits there "web sharing starting up".

myrkr 06-20-2005 07:11 PM

further looking into the console revealed

Jun 20 17:00:44 It-IMac crashdump[441]: crash report written to: /Library/Logs/CrashReporter/httpd.crash.log
Jun 20 17:05:40 It-IMac sudo: myrkr : TTY=ttyp1 ; PWD=/Users/myrkr ; USER=root ; COMMAND=/bin/chmod 644 /private/var/log/httpd/access_log
Jun 20 17:05:51 It-IMac sudo: myrkr : TTY=ttyp1 ; PWD=/Users/myrkr ; USER=root ; COMMAND=/bin/chmod 644 /private/var/log/httpd/error_log
Jun 20 17:05:56 It-IMac sudo: myrkr : TTY=ttyp2 ; PWD=/Users/myrkr ; USER=root ; COMMAND=/usr/sbin/apachectl graceful
Jun 20 17:05:57 It-IMac crashdump[452]: httpd crashed
Jun 20 17:05:57 It-IMac crashdump[452]: crash report written to: /Library/Logs/CrashReporter/httpd.crash.log



and in "/Library/Logs/CrashReporter/httpd.crash.log"

Host Name: It-IMac
Date/Time: 2005-06-20 17:05:57.164 -0600
OS Version: 10.4.1 (Build 8B15)
Report Version: 3

Command: httpd
Path: /usr/sbin/httpd
Parent: launchd [1]

Version: ??? (???)

PID: 451
Thread: 0

Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000000

Thread 0 Crashed:
0 libSystem.B.dylib 0x90003248 strlen + 8
1 mod_bonjour.so 0x000c0bf8 dyld_stub_ap_ctx_get + 770484
2 mod_bonjour.so 0x000c0ff8 dyld_stub_ap_ctx_get + 771508
3 mod_bonjour.so 0x000c0458 dyld_stub_ap_ctx_get + 768532
4 mod_bonjour.so 0x000c157c dyld_stub_ap_ctx_get + 772920
5 mod_bonjour.so 0x000c1a5c dyld_stub_ap_ctx_get + 774168
6 httpd 0x0000e9c0 invoke_cmd + 1416
7 httpd 0x0000ee40 ap_handle_command + 320
8 httpd 0x0000eeb4 ap_srm_command_loop + 44
9 httpd 0x0000f53c ap_process_resource_config + 1000
10 httpd 0x0000fe14 ap_read_config + 100
11 httpd 0x000073f0 standalone_main + 228
12 httpd 0x00007d74 main + 1052
13 httpd 0x0000238c _start + 348
14 httpd 0x0000222c start + 60

Thread 0 crashed with PPC Thread State:
srr0: 0x90003248 srr1: 0x0000f030 vrsave: 0x00000000
cr: 0x28002242 xer: 0x20000006 lr: 0x000c0bf8 ctr: 0x90003240
r0: 0x000c0bf8 r1: 0xbfffcf70 r2: 0x00000000 r3: 0x00000000
r4: 0x00000000 r5: 0x00000000 r6: 0x00000001 r7: 0xffffffff
r8: 0x00000000 r9: 0x00000000 r10: 0x000c4288 r11: 0x000c4170
r12: 0x90003240 r13: 0x00000000 r14: 0x00000000 r15: 0x00000000
r16: 0x00000000 r17: 0x00000000 r18: 0x00000000 r19: 0x00000000
r20: 0x000c3924 r21: 0x00000050 r22: 0x0181b730 r23: 0x01000082
r24: 0xbfffd540 r25: 0x003003cc r26: 0x000c0c88 r27: 0x00000000
r28: 0xbffff7f0 r29: 0x00000006 r30: 0x00000000 r31: 0x000c0be0

Binary Images Description:
0x1000 - 0x4ffff httpd /usr/sbin/httpd
0x65000 - 0x67fff mod_log_config.so /usr/libexec/httpd/mod_log_config.so
0x6a000 - 0x6bfff mod_mime.so /usr/libexec/httpd/mod_mime.so
0x6e000 - 0x72fff mod_negotiation.so /usr/libexec/httpd/mod_negotiation.so
0x75000 - 0x7afff mod_include.so /usr/libexec/httpd/mod_include.so
0x7e000 - 0x82fff mod_autoindex.so /usr/libexec/httpd/mod_autoindex.so
0x86000 - 0x86fff mod_dir.so /usr/libexec/httpd/mod_dir.so
0x89000 - 0x8afff mod_cgi.so /usr/libexec/httpd/mod_cgi.so
0x8d000 - 0x8dfff mod_asis.so /usr/libexec/httpd/mod_asis.so
0x90000 - 0x92fff mod_imap.so /usr/libexec/httpd/mod_imap.so
0x95000 - 0x95fff mod_actions.so /usr/libexec/httpd/mod_actions.so
0x98000 - 0x98fff mod_userdir.so /usr/libexec/httpd/mod_userdir.so
0x9b000 - 0x9cfff mod_alias.so /usr/libexec/httpd/mod_alias.so
0x9f000 - 0xa8fff mod_rewrite.so /usr/libexec/httpd/mod_rewrite.so
0xac000 - 0xadfff mod_access.so /usr/libexec/httpd/mod_access.so
0xb0000 - 0xb1fff mod_auth.so /usr/libexec/httpd/mod_auth.so
0xb4000 - 0xb5fff mod_log_forensic.so /usr/libexec/httpd/mod_log_forensic.so
0xb8000 - 0xb8fff mod_setenvif.so /usr/libexec/httpd/mod_setenvif.so
0xbb000 - 0xbbfff mod_hfs_apple.so /usr/libexec/httpd/mod_hfs_apple.so
0xbe000 - 0xc3fff mod_bonjour.so /usr/libexec/httpd/mod_bonjour.so
0x8fe00000 - 0x8fe50fff dyld 43 /usr/lib/dyld
0x90000000 - 0x901a6fff libSystem.B.dylib /usr/lib/libSystem.B.dylib
0x901fe000 - 0x90202fff libmathCommon.A.dylib /usr/lib/system/libmathCommon.A.dylib
0x90727000 - 0x90800fff com.apple.CoreFoundation 6.4.1 (368.1) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x9084b000 - 0x9094dfff libicucore.A.dylib /usr/lib/libicucore.A.dylib
0x909a7000 - 0x90a2bfff libobjc.A.dylib /usr/lib/libobjc.A.dylib
0x90ae3000 - 0x90af5fff libauto.dylib /usr/lib/libauto.dylib
0x91076000 - 0x91238fff com.apple.security 4.0 (221) /System/Library/Frameworks/Security.framework/Versions/A/Security
0x9134a000 - 0x91371fff com.apple.SystemConfiguration 1.8.0 /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
0x93586000 - 0x935a8fff com.apple.DirectoryService.Framework 2.0 /System/Library/Frameworks/DirectoryService.framework/Versions/A/DirectoryService

hayne 06-20-2005 09:30 PM

Quote:

Originally Posted by myrkr
it worked until i edited the "httpd.conf" file to enable php, and restarted using "apachectl graceful".

The fact the problem occurred after you edited the httpd.conf file in itself would indicate that there is probably something wrong with the changes you made to the file.
This seems to be corroborated by the crash log that indicates that the crash occurred when executing the function:
ap_read_config

You should revert to your backup copy of httpd.conf and then try again. Be sure that you are using an editor that works with plain text and saves using Unix line endings. (See question #8 of http://forums.macosxhints.com/showthread.php?t=40648)
It is rather unusual that a bad config file would cause a crash - but that is what seems to be happening.

Quote:

i tried "sudo chmod 777 /private/var/log/httpd/error_log"
That was a bad idea. You shouldn't go changing permissions willy-nilly just to try to fix some other problem. The original permissions on the error_log are just fine for the usual Apache config.
The 'error_log' file is owned by 'root' and writable by owner and Apache starts up with 'root' privileges, hence it should have no problem in writing to that file.
Here's what it is on my 10.4.1 system:
Code:

ls -l /var/log/httpd/error_log
-rw-r-----  1 root  admin  0 Jun  7 09:57 /var/log/httpd/error_log

Quote:

apachectl start
I assume you meant:
Code:

sudo apachectl start

stetner 06-21-2005 07:43 AM

Quote:

Originally Posted by hayne
I assume you meant:
Code:

sudo apachectl start

And I assume he did not mean that, which is why he is having this trouble! :)

In other words, you SHOULD be using 'sudo' in front of your apachectl commands.

myrkr 06-21-2005 02:02 PM

i did use sudo
 
the lack of sudo was not the problem... the files are set to the original permissions.
the first thing i did was revert to the original backup files.
i ran

sudo apachectl configtest
Password:
Sorry, try again.
Password:
Processing config directory: /private/etc/httpd/users/*.conf
Processing config file: /private/etc/httpd/users/itimac.conf
Processing config file: /private/etc/httpd/users/myrkr.conf
Syntax OK

so it seems that the config files are OK

i have been using text wrangler set to unix line endings.

i did a differences check between the "httpd.conf.default" and "httpd.conf.bak" files
there were some odd differences

--------------------httpd.conf.bak----------------httpd.conf.default
MinSpareServers---------5-------------------------------1
MaxSpareServers--------10------------------------------5

StartServers--------------5-------------------------------1

MaxRequestsPerChild-----0----------------------------100000

------------------------------------------------LoadModule bonjour_module ....

-------------------------------------------------AddModule bonjour_module.c ....

User------------------nobody----------------------------www
Group-----------------nobody----------------------------www

ServerAdmin----you@your.address------#.....(commented out)

UserDir---------------public_html----------------------------sites

<Directory-----------/home/*/public_html-----------------/Users/*/sites

----------------------------------------------------extra<IfModule... for the bonjour_module>

the .bak seems to be a standard Unix configuration, while the .default seems to be the standard Apple configuration. But what threw me was the group and user. i switched the '.conf' file to use the nobody '.bak' file and it worked.

So if anybody has an idea why the change made a difference i would like to hear it.

i think it has to do with the user and group. i dont know why the www user doesnt work anymore. it runs fine as nobody...

myrkr 06-21-2005 02:15 PM

i just switched back...
 
i just switched back to the old '.conf' just to see if it really was the group and it runs just fine as user and group 'www'.

i think it is really odd because i tried using that '.conf' file before and it did not work.

so i basically have no idea what the problem is... i will try to re-enable the 'php_module' and see what happens.

myrkr 06-21-2005 02:45 PM

php does it but...
 
but i cannot simply reload the apple-type '.conf' file. i must start apache using the unix type file then restart apache using the apple file.

So if anyone knows... i will check to see if i have php installed... i dont see why it wouldn't be.

hayne 06-21-2005 04:11 PM

Quote:

Originally Posted by myrkr
but i cannot simply reload the apple-type '.conf' file. i must start apache using the unix type file then restart apache using the apple file.

That doesn't seem right.
Restarting Apache should make it completely forget what the original settings were - so it shouldn't make any difference.

You need to use what you call the "Apple-type" file.
You should check to be sure that you haven't modified it from the way Apple supplied it by checking against the version of that file that is on the CD or DVD that came with your OS. You can use the 3rd-party utility "Pacifist" to extract it from the CD/DVD.

You can use the Unix tool 'diff' to check what changes you have made:
diff file1 file2

myrkr 06-21-2005 05:55 PM

after i broke it again by trying to enable php.... i ran...

[it-imac:~] myrkr% sudo apachectl graceful
Password:
/usr/sbin/apachectl graceful: httpd gracefully restarted

it was broken... i could not access it using safari by means of 'localhost' or '127.0.0.1'.
i then ran...(this is the apple type file)....

[it-imac:~] myrkr% sudo cp /private/etc/httpd/httpd.conf.default /private/etc/httpd/httpd.conf

and restarted using....

[it-imac:~] myrkr% sudo apachectl graceful /usr/sbin/apachectl graceful: httpd not running, trying to start
Processing config directory: /private/etc/httpd/users/*.conf
Processing config file: /private/etc/httpd/users/itimac.conf
Processing config file: /private/etc/httpd/users/myrkr.conf
/usr/sbin/apachectl graceful: httpd started

it didn't start up so i ran...(this is the unix type file)...

[it-imac:~] myrkr% sudo cp /private/etc/httpd/httpd.conf.bak /private/etc/httpd/httpd.conf

i tried the command .....

[it-imac:~] myrkr% sudo apachectl graceful /usr/sbin/apachectl graceful: httpd not running, trying to start
/usr/sbin/apachectl graceful: httpd started

it started up, but i didn't want to use this '.conf' file, so i ran the incorrect then the correct command....

[it-imac:~] myrkr% sudo cp /private/etc/httpd/httpd.conf.bak /private/etc/httpd/httpd.conf
[it-imac:~] myrkr% sudo cp /private/etc/httpd/httpd.conf.default /private/etc/httpd/httpd.conf

and restarted ....

[it-imac:~] myrkr% sudo apachectl graceful /usr/sbin/apachectl graceful: httpd gracefully restarted

it worked as it should have in the begining...
i extracted the original apple file from the cd to my desktop and ran the diff command...

[it-imac:~] myrkr% diff /Users/myrkr/Desktop/httpd.conf.default /private/etc/httpd/httpd.conf
[it-imac:~] myrkr%

no results i assume means no differences...
the 'text wrangler' difference finder also reports no differences.

perhaps someone can make sense of this...

hayne 06-21-2005 11:55 PM

Quote:

Originally Posted by myrkr
[it-imac:~] myrkr% sudo apachectl graceful
/usr/sbin/apachectl graceful: httpd not running, trying to start
Processing config directory: /private/etc/httpd/users/*.conf
Processing config file: /private/etc/httpd/users/itimac.conf
Processing config file: /private/etc/httpd/users/myrkr.conf
/usr/sbin/apachectl graceful: httpd started

it didn't start up

Umm - it says that it started up: "httpd started".
I guess you mean that it didn't seem to work when you tried some URL in your browser. So please tell us what URL you tried and where you have put your HTML files, and what error message you got, etc.

myrkr 06-22-2005 11:36 AM

the browser is told to go to http://localhost/ which is also known as 127.0.0.1, also the same as if i typed my own ipaddress , and i get a connection refused error. the system log shows that httpd crashes right after it starts.

'Safari can’t open the page “http://localhost/” because it could not connect to the server “localhost”.'

Firefox says, 'the connection was refused when attempting to contact localhost.'

i dont even have to change the config files...a simple 'sudo apachectl graceful' causes a crash.

hayne 06-22-2005 11:59 AM

Quote:

Originally Posted by myrkr
and i get a connection refused error. the system log shows that httpd crashes right after it starts

If the web server has crashed, then of course you will get a connection refused error. So when you said that it isn't working, what you really meant was that Apache is crashing. That is quite a lot different.

To debug an application crash, the most important thing to do is to look at the crash logs. These are most easily accessible via the "Console" application.
Launch the "Console" application (under /Applications/Utilities) and look for relevant error messages. Note that messages are labeled with the date & time so you can use that to locate the part of the log to look at. Copy & paste the relevant messages back here so we can see them.
If the log refers to a crash log, press the "Logs" button (top-left) and go into the ~/Library/Logs section to find that particular crash log. Copy & paste back here the last portion of that crash log - the part that gives details about the last crash (or preferably attach it as a plain text file, using the "Manage Attachments" button at the bottom when you reply).

But before doing this, you should go back to the Apple-supplied version of Apache (I presume you saved a copy - otherwise extract it from the DVD/CD as before) and check that all works well with that.
If so, the problem is likely with whatever changes you have made to the 'httpd' executable and any shared libraries that it loads.

It is important to note that if you start using versions of software extracted from the DVD/CD, you won't have the updates that Apple may have supplied since the release of that DVD/CD and the files in /Library/Receipts will prevent Software Update from noticing that you are using an old version. Hence you may miss important security updates etc.


All times are GMT -5. The time now is 10:31 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.