Mac Apache setup new DocumentRoot

Since most stuff get tested on my MAMP server i look for a second local test environment . Some server related packages are just much easier to install under Apache than to compile it for MAMP.  Default MAMP port is 8888 and some software need the default 80 port .

First of all i moves the default Apache directory from  /Library/WebServer/Documents

to my webdev disc www add near Line 173

# Mac ApacheServer port80
DocumentRoot "/Volumes/www/ApacheWebserver"

Therefore edited the Apache  httpd.conf  in /private/etc/apache2

to make it available under add ServerName Localhost

# 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 your host doesn't have a registered DNS name, enter its IP address here.

ServerName localhost

And one more edit according to stackoverflow to access the folder near line 183

<Directory />
    #Options FollowSymLinks
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order deny,allow
    Allow from all

Dont forget to restart the apache server with the Terminal command monitor in your console log if any error shown.

sudo /usr/sbin/apachectl restart

Tags: , ,

Code Cowboy

Exploring and Notes about interesting code snipets

Leave a Reply

Your email address will not be published. Required fields are marked *