Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

fall3n

macrumors 6502
Original poster
Aug 17, 2006
392
0
I'm looking for an apache2 & mysql 5 tool that allows me to toggle on/off & restart apache2 and mysql 5 (doesn't have to be all in one) for mac os x. Would be nice if I could use it from the System Preferences panel. Also, I just need the controller tool, not the whole package. I already have everything setup. It just gets anoying having to use terminal to restart the server. Does anyone know something like this?
 
I'm sure it's available separately from somewhere, but Complete Apache has a prefpane that comes with it. (you have to download the whole package, but you don't have to install Apache itself)

There's a MySQL one here (I haven't tried it), or again, the Complete MySQL package has one (it's for 4, but will probably still work with 5)
 
Mamp

I'm using, and recommending MAMP...

Easy to install (just drag and drop the downloaded folder in the applications folder) and has a widget to start and stop the apache/php/mysql server.

There also is a little application that can help you configuring some basic tools and has the links to phpmyadmin etc.

You can find it at: http://www.mamp.info/
 
kiskadee said:
I'm using, and recommending MAMP...

Easy to install (just drag and drop the downloaded folder in the applications folder) and has a widget to start and stop the apache/php/mysql server.

There also is a little application that can help you configuring some basic tools and has the links to phpmyadmin etc.

You can find it at: http://www.mamp.info/

That sounds awesome! But where is it? I'm also using MAMP 5.5, but I didn't see anything about a widget. Where/how do I install it?
 
I found the widget and installed it, but it wasn't working. Didn't have time to fiddle with anything before work though. I've changed a lot of settings with my server, so perhaps that is why. I also can't get it (apache) to listen to port 80, maybe that's why the widget isn't working? I'd like to fix this though as I don't like having to put :8080 at the end of each virtualhost all the time.
 
frankblundt said:
I'm sure it's available separately from somewhere, but Complete Apache has a prefpane that comes with it. (you have to download the whole package, but you don't have to install Apache itself)

There's a MySQL one here (I haven't tried it), or again, the Complete MySQL package has one (it's for 4, but will probably still work with 5)

I think I might give these ones a shot because they are the same that I use at work. Thanks for the links. Woulda done this in the first place, but it was the weekend when I was setting it up.
 
fall3n said:
I think I might give these ones a shot because they are the same that I use at work. Thanks for the links. Woulda done this in the first place, but it was the weekend when I was setting it up.

Well, gave them a try but they didn't work. I think it's because I'm on a core duo 2 system? I had issues with the stuffit preference pane as well, so I don't think it's just my server stuff.
 
if none of the above suggestions are working, don't count out applescript. just write a little script and save it on the desktop or put it in the dock. if you're stopping/starting it from terminal, you already know the commands. just put them in a script and go. (for that matter, you could just write a shell script.)

another (better and more convenient?) option is webmin. you have to have a browser window (or tab!) open for it, but if you're doing web development you probably already have that! it does what you want plus a WHOLE lot more.

i have a prefpane for mysql, but i can't remember where i got it. probably from entropy.ch since i used a lot of liyanage's stuff, but i can't say for sure. i might have gotten straight of of mysql.com. i think a separate prefpane installer .pkg comes with the download. anyway, i hardly every use it but the last time i did it worked flawlessly.

also, it really doesn't matter nor is it any of my business, but i am curious as to why you need to stop and start apache and mysql so often.
 
Thom_Edwards said:
if none of the above suggestions are working, don't count out applescript. just write a little script and save it on the desktop or put it in the dock. if you're stopping/starting it from terminal, you already know the commands. just put them in a script and go. (for that matter, you could just write a shell script.)

another (better and more convenient?) option is webmin. you have to have a browser window (or tab!) open for it, but if you're doing web development you probably already have that! it does what you want plus a WHOLE lot more.

i have a prefpane for mysql, but i can't remember where i got it. probably from entropy.ch since i used a lot of liyanage's stuff, but i can't say for sure. i might have gotten straight of of mysql.com. i think a separate prefpane installer .pkg comes with the download. anyway, i hardly every use it but the last time i did it worked flawlessly.

also, it really doesn't matter nor is it any of my business, but i am curious as to why you need to stop and start apache and mysql so often.

Thanks for the advice. I mainly need to restart apache when I add new virtual hosts to my dev server. I also want to have apache start up when I start my computer, right now it's not doing this.
 
you don't have the built-in apache running concurrently by some chance?

you need to turn off Personal Web Sharing to get the built in Apache to stop booting at startup - this might be why your install can't listen on port 80. When you do this you'll need to add a new entry in Firewall settings to allow traffic through on 80 (call it Apache2 or whatever) because the one that opens up with PWS will be closed when you turn it off.

The prefpanes didn't work how? did they show up in System Preferences or not even that? (I have no experience with Intel Macs i'm afraid)
 
frankblundt said:
you don't have the built-in apache running concurrently by some chance?

you need to turn off Personal Web Sharing to get the built in Apache to stop booting at startup - this might be why your install can't listen on port 80. When you do this you'll need to add a new entry in Firewall settings to allow traffic through on 80 (call it Apache2 or whatever) because the one that opens up with PWS will be closed when you turn it off.

The prefpanes didn't work how? did they show up in System Preferences or not even that? (I have no experience with Intel Macs i'm afraid)

I have Personal Web Sharing completely uninstalled, so I don't think that it could be running simultaneously, however I didn't enable the firewall thing (though my firewall wasn't even on). The prefpanes showed up, but they wouldn't work, kept giving me errors. I think it's because they arn't compatible with intel macs.
 
firewall didn't work :( It's some other program running at the same time, but I can't figure out which one...
 
i've never got a great deal of sense out of it but try Utilities >Nework Utility > Netstat > display all current socket connections - it'll at least show if something's listening on http

also check the Activity Monitor to see if there's an httpd Administrator process running - if there is, kill it an see if you can start your install properly.

Do you have a Universal Binary binary of Apache? maybe that's your problem.. iTools has one, along with everything else you need and some you probably don't for a mere $350
 
frankblundt said:
i've never got a great deal of sense out of it but try Utilities >Nework Utility > Netstat > display all current socket connections - it'll at least show if something's listening on http

also check the Activity Monitor to see if there's an httpd Administrator process running - if there is, kill it an see if you can start your install properly.

Do you have a Universal Binary binary of Apache? maybe that's your problem.. iTools has one, along with everything else you need and some you probably don't for a mere $350

Thanks for the advice, I'll have to try all that stuff when I get home from work. What do you mean by Universal Binary of Apache? (Do you mean it can run on all OS's?) I'm using MAMPstack 5.5
 
like i said, i don't know about the Intel side of things, but most of the binaries for Apache I've seen (including those on the Apache site) are for PPC, which would mean presumably that they'd have to run under Rosetta on an Intel Mac, which they may not like. I'd think the one that comes built-in would have been converted to Universal, and the fact that iTools includes a UB version implies to me that it would be better to run that one on an Intel Mac. I haven't used MAMP since the very early days when it was a bit of a dog, so i'm not up with the play on whether or not the current release is UB or PPC - if they don't say which, i'd assume PPC.

Apache will run on just about anything, but the source has to be compiled for the particular type of processor that will be running it.

You might be better off to some extent just using the one that comes built in - last time i looked it was version 1.3, which is a bit behind the times but still good and very stable. To alter the httpd.conf file you need to use Finder > Go > Go to Folder > /etc/httpd and start the server with Personal Web Sharing. The root folder for "personal" sites is your user folder, but the base for localhost web docs is in /Library/Webserver/Documents
 
hmmm, well here's the thing. I only really have 2 problems with my setup

1. It won't let me Listen on port 80

2. It doesn't start up automatically when I boot up my machine / there's no easy GUI to quickly restart the server
 
Oh, and also I ran a netstat, but I'm not really sure how to read it...I also didn't find any processes with httpd

Active Internet connections (including servers)
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 0 0 *.* *.* CLOSED
tcp4 0 0 localhost.netinfo-loca localhost.1011 ESTABLISHED
tcp4 0 0 localhost.1011 localhost.netinfo-loca ESTABLISHED
tcp4 0 0 localhost.netinfo-loca localhost.1015 ESTABLISHED
tcp4 0 0 localhost.1015 localhost.netinfo-loca ESTABLISHED
tcp4 0 0 localhost.netinfo-loca localhost.1021 ESTABLISHED
tcp4 0 0 localhost.1021 localhost.netinfo-loca ESTABLISHED
tcp4 0 0 localhost.netinfo-loca *.* LISTEN
udp4 0 0 192.168.1.100.49180 *.*
udp4 0 0 *.mdns *.*
udp4 0 0 localhost.49174 localhost.1022
udp4 0 0 localhost.49173 localhost.1022
udp4 0 0 localhost.1022 *.*
udp4 0 0 localhost.49172 localhost.1023
udp4 0 0 localhost.1023 *.*
udp4 0 0 192.168.1.100.ntp *.*
udp6 0 0 fe80:4::216:cbff.123 *.*
udp6 0 0 fe80:1::1.123 *.*
udp6 0 0 localhost.123 *.*
udp4 0 0 localhost.ntp *.*
udp6 0 0 *.123 *.*
udp4 0 0 *.ntp *.*
udp6 0 0 *.5353 *.*
udp4 0 0 *.mdns *.*
udp4 0 0 localhost.netinfo-loca *.*
udp4 0 0 *.* *.*
icm6 0 0 *.* *.*
Active LOCAL (UNIX) domain sockets
Address Type Recv-Q Send-Q Inode Conn Refs Nextref Addr
2f42000 stream 0 0 0 2f42088 0 0 /var/run/mDNSResponder
2f42088 stream 0 0 0 2f42000 0 0
2f42550 stream 0 0 0 2f425d8 0 0 /var/run/mDNSResponder
2f425d8 stream 0 0 0 2f42550 0 0
2f42880 stream 0 0 3375108 0 0 0 /var/run/pppconfd
2f42dd0 stream 0 0 32b9a50 0 0 0 /var/run/mDNSResponder
2f42908 stream 0 0 0 2f42b28 0 0 /var/run/asl_input
2f42b28 stream 0 0 0 2f42908 0 0
2f42990 stream 0 0 329ae70 0 0 0 /var/run/asl_input
2f42ee0 stream 0 0 327cb58 0 0 0 /var/run/portmap.socket
2f42f68 stream 0 0 2f1f294 0 0 0 /var/launchd/0/sock
3c49ee0 dgram 0 0 0 3c49f68 3c49f68 0
3c49f68 dgram 0 0 0 3c49ee0 3c49ee0 0
2f42770 dgram 0 0 0 2f42e58 0 2f42330
2f42330 dgram 0 0 0 2f42e58 0 2f42110
2f42110 dgram 0 0 0 2f42e58 0 2f42198
2f42198 dgram 0 0 0 2f42e58 0 2f42220
2f42220 dgram 0 0 0 2f42e58 0 2f422a8
2f422a8 dgram 0 0 0 2f42e58 0 2f423b8
2f423b8 dgram 0 0 0 2f42e58 0 2f427f8
2f42440 dgram 0 0 0 2f424c8 2f424c8 0
2f424c8 dgram 0 0 0 2f42440 2f42440 0
2f42660 dgram 0 0 0 2f426e8 2f426e8 0
2f426e8 dgram 0 0 0 2f42660 2f42660 0
2f427f8 dgram 0 0 0 2f42e58 0 2f42cc0
2f42cc0 dgram 0 0 0 2f42e58 0 2f42bb0
2f42bb0 dgram 0 0 0 2f42e58 0 2f42aa0
2f42aa0 dgram 0 0 0 2f42e58 0 2f42a18
2f42a18 dgram 0 0 0 2f42e58 0 0
2f42c38 dgram 0 0 0 2f42d48 2f42d48 0
2f42d48 dgram 0 0 0 2f42c38 2f42c38 0
2f42e58 dgram 0 0 329ace4 0 2f42770 0 /var/run/syslog
 
from terminal, try
Code:
netstat -natp tcp
and look for *.80 in the local address column. if it's there, then look in the last column of that row. if it says LISTEN, i'm pretty sure that means that port 80 is busy. i'm not 100% sure on this, but i think i'm right. i'll check with the unix guru tomorrow to make sure and to see if there is a better way.
 
Yep. This is what I did. IP address: 127.0.0.1 Port 80 and 80

This is what I get when the server is off and on (only on when it can listen to port 8080 of course):

Port Scan has started ...

Port Scanning host: 127.0.0.1

Port Scan has completed ...
 
Thom_Edwards said:
from terminal, try
Code:
netstat -natp tcp
and look for *.80 in the local address column. if it's there, then look in the last column of that row. if it says LISTEN, i'm pretty sure that means that port 80 is busy. i'm not 100% sure on this, but i think i'm right. i'll check with the unix guru tomorrow to make sure and to see if there is a better way.

this is what I got.

james:~ James$ netstat -natp tcp
Active Internet connections (including servers)
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 0 0 192.168.1.100.49288 72.14.253.104.80 ESTABLISHED
tcp46 0 0 *.8080 *.* LISTEN
tcp4 0 0 *.3306 *.* LISTEN
tcp4 0 0 192.168.1.100.49251 209.249.114.28.80 ESTABLISHED
tcp4 0 0 127.0.0.1.1033 127.0.0.1.1006 ESTABLISHED
tcp4 0 0 127.0.0.1.1006 127.0.0.1.1033 ESTABLISHED
tcp4 0 0 127.0.0.1.1033 127.0.0.1.1007 ESTABLISHED
tcp4 0 0 127.0.0.1.1007 127.0.0.1.1033 ESTABLISHED
tcp4 0 0 *.* *.* CLOSED
tcp4 0 0 127.0.0.1.1033 127.0.0.1.1021 ESTABLISHED
tcp4 0 0 127.0.0.1.1021 127.0.0.1.1033 ESTABLISHED
tcp4 0 0 127.0.0.1.1033 *.* LISTEN
 
well, if i'm right on how this works, it looks like 80 is open. when i run it i see the expected port numbers (including 80) listening. *surely* udp isn't listening; you can try the same command i mentioned earlier, but with udp instead tcp. i doubt you'll see *.80 there, but it can't hurt to check.

this has become a mission for me!!! feel like posting your httpd.conf? it should be at /etc/httpd/httpd.conf (or, more accurately for OS X, /private/etc/httpd/httpd.conf). also, make sure you don't have more than one copy floating around. use
Code:
locate httpd.conf
in terminal to find all the possible copies. you'll only be interested in the ones that end in "/httpd.conf". (i'm not sure of your unix experience, so forgive me if i'm being too verbose.) since you're not using personal web sharing, i assume you installed apache from a different source and it may be in a different place. can't say for sure, but maybe you're editing the wrong httpd.conf file... again, not trying to insult, i'm just thinking of all the possibilities.
 
Thom_Edwards said:
well, if i'm right on how this works, it looks like 80 is open. when i run it i see the expected port numbers (including 80) listening. *surely* udp isn't listening; you can try the same command i mentioned earlier, but with udp instead tcp. i doubt you'll see *.80 there, but it can't hurt to check.

this has become a mission for me!!! feel like posting your httpd.conf? it should be at /etc/httpd/httpd.conf (or, more accurately for OS X, /private/etc/httpd/httpd.conf). also, make sure you don't have more than one copy floating around. use
Code:
locate httpd.conf
in terminal to find all the possible copies. you'll only be interested in the ones that end in "/httpd.conf". (i'm not sure of your unix experience, so forgive me if i'm being too verbose.) since you're not using personal web sharing, i assume you installed apache from a different source and it may be in a different place. can't say for sure, but maybe you're editing the wrong httpd.conf file... again, not trying to insult, i'm just thinking of all the possibilities.

no worries, i'm here to learn. I do know a bit (and have learned a bit through this experience) I ran the locate command you said and got this:

/private/etc/httpd/httpd.conf
/private/etc/httpd/httpd.conf.bak
/private/etc/httpd/httpd.conf.default
/private/etc/httpd/httpd.conf.entropy.backup
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/configs/lighttpd.conf

which is interesting because I have the config file in /Applications/mampstack-5.5/apache2/conf/httpd.conf and i'm pretty sure that's the one thats being read because when i edit it it responds. i have a bunch of virtual hosts that run from it and they all work and when i change the Listen configuration it responds to what i set it to. This seems really weird to me...
 
oh and here's my config file. sorry it's looooong. the listen port is set to 8080 of course as 80 doesn't work.

#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.0/> for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# The configuration directives are grouped into three basic sections:
# 1. Directives that control the operation of the Apache server process as a
# whole (the 'global environment').
# 2. Directives that define the parameters of the 'main' or 'default' server,
# which responds to requests that aren't handled by a virtual host.
# These directives also provide default values for the settings
# of all virtual hosts.
# 3. Settings for virtual hosts, which allow Web requests to be sent to
# different IP addresses or hostnames and have them handled by the
# same Apache server process.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
# with ServerRoot set to "/Applications/mampstack-5.5/apache2" will be interpreted by the
# server as "/Applications/mampstack-5.5/apache2/logs/foo.log".
#

### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
#

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE! If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the LockFile documentation (available
# at <URL:http://httpd.apache.org/docs/2.0/mod/mpm_common.html#lockfile>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
ServerRoot "/Applications/mampstack-5.5/apache2"

#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
<IfModule !mpm_winnt.c>
<IfModule !mpm_netware.c>
#LockFile logs/accept.lock
</IfModule>
</IfModule>

#
# ScoreBoardFile: File used to store internal server process information.
# If unspecified (the default), the scoreboard will be stored in an
# anonymous shared memory segment, and will be unavailable to third-party
# applications.
# If specified, ensure that no two invocations of Apache share the same
# scoreboard file. The scoreboard file MUST BE STORED ON A LOCAL DISK.
#
<IfModule !mpm_netware.c>
<IfModule !perchild.c>
#ScoreBoardFile logs/apache_runtime_status
</IfModule>
</IfModule>


#
# PidFile: The file in which the server should record its process
# identification number when it starts.
#
<IfModule !mpm_netware.c>
PidFile logs/httpd.pid
</IfModule>

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15

##
## Server-Pool Size Regulation (MPM specific)
##

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>

# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule worker.c>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>

# perchild MPM
# NumServers: constant number of server processes
# StartThreads: initial number of worker threads in each server process
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# MaxThreadsPerChild: maximum number of worker threads in each server process
# MaxRequestsPerChild: maximum number of connections per server process
<IfModule perchild.c>
NumServers 5
StartThreads 5
MinSpareThreads 5
MaxSpareThreads 10
MaxThreadsPerChild 20
MaxRequestsPerChild 0
</IfModule>

# WinNT MPM
# ThreadsPerChild: constant number of worker threads in the server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_winnt.c>
ThreadsPerChild 250
MaxRequestsPerChild 0
</IfModule>

# BeOS MPM
# StartThreads: how many threads do we initially spawn?
# MaxClients: max number of threads we can have (1 thread == 1 client)
# MaxRequestsPerThread: maximum number of requests each thread will process
<IfModule beos.c>
StartThreads 10
MaxClients 50
MaxRequestsPerThread 10000
</IfModule>

# NetWare MPM
# ThreadStackSize: Stack size allocated for each worker thread
# StartThreads: Number of worker threads launched at server startup
# MinSpareThreads: Minimum number of idle threads, to handle request spikes
# MaxSpareThreads: Maximum number of idle threads
# MaxThreads: Maximum number of worker threads alive at the same time
# MaxRequestsPerChild: Maximum number of requests a thread serves. It is
# recommended that the default value of 0 be set for this
# directive on NetWare. This will allow the thread to
# continue to service requests indefinitely.
<IfModule mpm_netware.c>
ThreadStackSize 65536
StartThreads 250
MinSpareThreads 25
MaxSpareThreads 250
MaxThreads 1000
MaxRequestsPerChild 0
MaxMemFree 100
</IfModule>

# OS/2 MPM
# StartServers: Number of server processes to maintain
# MinSpareThreads: Minimum number of idle threads per process,
# to handle request spikes
# MaxSpareThreads: Maximum number of idle threads per process
# MaxRequestsPerChild: Maximum number of connections per server process
<IfModule mpmt_os2.c>
StartServers 2
MinSpareThreads 5
MaxSpareThreads 10
MaxRequestsPerChild 0
</IfModule>

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80

Listen 8080

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule access_module modules/mod_access.so
LoadModule auth_module modules/mod_auth.so
LoadModule auth_anon_module modules/mod_auth_anon.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule asis_module modules/mod_asis.so
LoadModule info_module modules/mod_info.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule imap_module modules/mod_imap.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule php5_module modules/libphp5.so
 
#
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
#ExtendedStatus On

### Section 2: 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition. These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

<IfModule !mpm_winnt.c>
<IfModule !mpm_netware.c>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# . On SCO (ODT 3) use "User nouser" and "Group nogroup".
# . On HPUX you may not be able to use shared memory as nobody, and the
# suggested workaround is to create a user www and use that user.
# NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
# when the value of (unsigned)Group is above 60000;
# don't use Group #-1 on these systems!
#
User nobody
Group #-1
</IfModule>
</IfModule>

#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed. This address appears on some server-generated pages, such
# as error documents. e.g. admin@your-domain.com
#
ServerAdmin you@example.com

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work. See also the UseCanonicalName directive.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
#ServerName www.example.com:80

ServerName localhost

#
# UseCanonicalName: Determines how Apache constructs self-referencing
# URLs and the SERVER_NAME and SERVER_PORT variables.
# When set "Off", Apache will use the Hostname and Port supplied
# by the client. When set "On", Apache will use the value of the
# ServerName directive.
#
UseCanonicalName Off

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
#DocumentRoot "/Applications/mampstack-5.5/apache2/htdocs"
DocumentRoot "/Users/James/Sites"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
#<Directory "/Applications/mampstack-5.5/apache2/htdocs">
<Directory "/Users/James/Sites">

#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.0/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit Indexes
#
AllowOverride None

#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all

</Directory>

#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
UserDir public_html

#
# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#
#<Directory /home/*/public_html>
# AllowOverride FileInfo AuthConfig Limit Indexes
# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
# <Limit GET POST OPTIONS PROPFIND>
# Order allow,deny
# Allow from all
# </Limit>
# <LimitExcept GET POST OPTIONS PROPFIND>
# Order deny,allow
# Deny from all
# </LimitExcept>
#</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents. The MultiViews Option can be used for the
# same purpose, but it is much slower.
#
DirectoryIndex index.html index.html.var

#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives. See also the AllowOverride
# directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
</FilesMatch>

#
# TypesConfig describes where the mime.types file (or equivalent) is
# to be found.
#
TypesConfig conf/mime.types

#
# DefaultType is the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value. If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/plain

#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type. The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#
<IfModule mod_mime_magic.c>
MIMEMagicFile conf/magic
</IfModule>

#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off

#
# EnableMMAP: Control whether memory-mapping is used to deliver
# files (assuming that the underlying OS supports it).
# The default is on; turn this off if you serve from NFS-mounted
# filesystems. On some systems, turning it off (regardless of
# filesystem) can improve performance; for details, please see
# http://httpd.apache.org/docs/2.0/mod/core.html#enablemmap
#
#EnableMMAP off

#
# EnableSendfile: Control whether the sendfile kernel support is
# used to deliver files (assuming that the OS supports it).
# The default is on; turn this off if you serve from NFS-mounted
# filesystems. Please see
# http://httpd.apache.org/docs/2.0/mod/core.html#enablesendfile
#
#EnableSendfile off

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog logs/error_log

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

# You need to enable mod_logio.c to use %I and %O
#LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio

#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here. Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
CustomLog logs/access_log common
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.