Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

really need help to complete the Apache 2 upgrade

short history
used the following to install

./configure --enable-layout=Darwin --enable-rewrite --enable-so
make
sudo make install

below is the file/folder output.

I get the following error message when I try to start from command line

sudo ./apachectl -k start
Password:
httpd: Could not open configuration file /usr/local/apache2/conf/
httpd.conf: No such file or directory

so I tried the file option and got

./apachectl -f /private/etc/apache2/httpd.conf start
Usage: /usr/sbin/httpd [-D name] [-d directory] [-f file]
[-C "directive"] [-c "directive"]
[-k start|restart|graceful|graceful-stop|stop]
[-v] [-V] [-h] [-l] [-L] [-t] [-S]
Options:
-D name : define a name for use in <IfDefine name>
directives
-d directory : specify an alternate initial ServerRoot
-f file : specify an alternate ServerConfigFile
-C "directive" : process directive before reading config files
-c "directive" : process directive after reading config files
-e level : show startup errors of level (see LogLevel)
-E file : log startup errors to file
-v : show version number
-V : show compile settings
-h : list available command line options (this page)
-l : list compiled in modules
-L : list available configuration directives
-t -D DUMP_VHOSTS : show parsed settings (currently only vhost
settings)
-S : a synonym for -t -D DUMP_VHOSTS
-t -D DUMP_MODULES : show all loaded modules
-M : a synonym for -t -D DUMP_MODULES
-t : run syntax check for config files

So what is the best approach from here? Is this apachectl -f syntax incorrect?

Thanks everyone.

Mike

here is the install file/folder outpu

Installing configuration files
mkdir /etc/apache2
mkdir /etc/apache2/extra
mkdir /etc/apache2/original
mkdir /etc/apache2/original/extra
[PRESERVING EXISTING HTDOCS SUBDIR: /Library/WebServer/Documents]
Installing error documents
mkdir /usr/share/httpd/error
[PRESERVING EXISTING ICONS SUBDIR: /usr/share/httpd/icons]
mkdir /var/log/apache2
[PRESERVING EXISTING CGI SUBDIR: /Library/WebServer/CGI-Executables]
Installing header files
Installing build system files
Installing man pages and online manual
mkdir /Library/WebServer/share
mkdir /Library/WebServer/share/httpd
mkdir /Library/WebServer/share/httpd/manual

Mac OS X (10.4.6) intel

Posted on Apr 17, 2007 9:12 AM

Reply
8 replies

Apr 17, 2007 11:14 AM in response to mikemass

Your problem is:

>httpd: Could not open configuration file /usr/local/apache2/conf/httpd.conf: No such file or directory

By default, apache expects its configuration file to be in /usr/local/apache2/conf

You don't have a configuration file there, so Apache chokes. Apple puts the apache configuration in /etc/httpd/

You can't runhttpd.conf, even the Apple-supplied one - it tells Apache what to do, it doesn't do anything itself.

Your solutions are to either create a valid httpd.conf file at /usr/local/apache2/conf/httpd.conf or recompile Apache with a configuration switch that tells it whatever location you want to use for the config file using the PREFIX option: e.g. ./configure --prefix=/etc/httpd to match Apple's config.

Apr 17, 2007 11:42 AM in response to mikemass

Well

I created /usr/local/apache2/conf/httpd.conf

Each directory has root wheel user-group assingments, each dir seems to have 755 permissions, and httpd.conf has 644 permissions. Are these correct?

ls -l /usr/local/apache2/conf/
total 32
-rw-r--r-- 1 root wheel 13462 Apr 17 11:40 httpd.conf

error_log shows

[Tue Apr 17 08:51:38 2007] [error] (2)No such file or directory: could not create /usr/logs/httpd.pid
[Tue Apr 17 08:51:38 2007] [error] httpd: could not log pid to file /usr/logs/httpd.pid
[Tue Apr 17 11:40:55 2007] [error] (2)No such file or directory: could not create /usr/logs/httpd.pid
[Tue Apr 17 11:40:55 2007] [error] httpd: could not log pid to file /usr/logs/httpd.pid
nothing in access_log

Is this enough information ?

Mike

Apr 17, 2007 11:54 AM in response to mikemass

Did you read the error messages?

>[Tue Apr 17 08:51:38 2007] [error] (2)No such file or directory: could not create /usr/logs/httpd.pid

Apache is trying to create the file /usr/logs/httpd.pid but can't.

There is no /usr/logs directory by default in Mac OS X. Either create this directory or change the PidFile directive in your httpd.conf file to some location that Apache can use to store its PID.

Apr 17, 2007 12:34 PM in response to Camelot

Darn I thought we had it

here is the latest error from the command line
sudo /usr/sbin/apachectl -k start
(20014)Internal error: Error retrieving pid file logs/httpd.pid
Remove it before continuing if it is corrupted.

No errors recorded in the log I looked before.

how do you retrieve a command from history?

where else do I look for error messages related to this?

Mike

Apr 17, 2007 1:00 PM in response to mikemass

Well I did a fast search and found a message that said it was because I touched a file called httpd.pid. I guess Apache wanted to not stomp on another versions file.

So I removed the file and now I have /localhost/ working. But strange it shows, see output below. I'll need to repoint that to hopefully
/Library/WebServer/Documents]

I believe that is the preferred location for mac.

What your thoughts?

Index of /

.DS_Store
PoweredByMacOSX.gif
PoweredByMacOSXLarge.gif
Test.html
WebObjects/
apache_pb.gif
index.html.ca
index.html.cn
.....
index.html.se
index.html.zh-tw.big5
manual/

really need help to complete the Apache 2 upgrade

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.