Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 198965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:58:58+00:00 2026-05-11T16:58:58+00:00

I used this guide on Apple’s website to enable PHP on my computer but

  • 0

I used this guide on Apple’s website to enable PHP on my computer but I lost all my Apache configuration files in process. I ran this script which I found on Google to restore Apache on Mac OS X:

#!/bin/sh
# run with ./apache_refresh.sh
#If permissions error do: chmod u+x filename.sh
#WARNING THIS MAY DELETE OR CHANGE YOUR APACHE SETTING SO BACKUP IF YOU HAVE ANYTHING YOU WANT TO SAVE


echo "*******************************   Starting Apache Server Refresh - Leopard"

#make a temp directory to work with, you can change this if you choose
echo "*******************************   Creating the source folder"
mkdir ~/Desktop/apache-temp
cd ~/Desktop/apache-temp

#get current apache version, update or change if necessary 
echo "*******************************   Downloading Apache Server"
curl -O http://www.gtlib.gatech.edu/pub/apache/httpd/httpd-2.2.11.tar.gz

#if you change the apache version above be sure to change it here as well
echo "*******************************   Extracting Apache Server"
tar xzvf httpd-2.2.11.tar.gz
cd httpd-2.2.11

#you can change the default install paths, "Darwin" is the default leopard install, if you don't know what this means then don't change this!
echo "*******************************   Configuring Darwin Layout"
./configure --enable-layout=Darwin \
--enable-mods-shared=all \
--with-ssl=/usr \
--with-mpm=prefork \
--disable-unique-id \
--enable-ssl \
--enable-dav \
--enable-cache \
--enable-proxy \
--enable-logio \
--enable-deflate \
--with-included-apr \
--enable-cgi \
--enable-cgid \
--enable-suexec

#make the files
echo "*******************************   Compiling Apache Server"
make

#install the files
echo "*******************************   Installing Apache Server"
sudo make install

#backup hosts file
echo "*******************************   Backing up hosts file"
cd /private/etc
sudo cp hosts hosts.backup

#delete hosts file
echo "*******************************   Deleting Hosts File"
sudo rm hosts

echo "*******************************   Creating New Hosts File"
cd ~/Desktop/apache-temp
cat > hosts << EOF
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1   localhost
255.255.255.255 broadcasthost
::1             localhost 
fe80::1%lo0 localhost
EOF

#move new hosts file to /etc dir
echo "*******************************   Moving Hosts Filer"
sudo mv ~/Desktop/apache-temp/hosts /etc

#set hosts file permissions
echo "*******************************   Setting Hosts File Permissions"
cd /private/etc
sudo chown root hosts

#backup httpd.conf file
echo "*******************************   Backing up httpd.conf File"
cd /private/etc/apache2
sudo cp httpd.conf httpd.conf.backup

#delete to httpd.conf file
echo "*******************************   Deleting httpd.conf File"
sudo rm httpd.conf

#copy httpd.conf file from originals folder
echo "*******************************   Copying New httpd.conf File"
cd original
sudo cp httpd.conf /private/etc/apache2/httpd.conf

#backup httpd-vhosts.conf file
echo "*******************************   Backing up httpd-vhosts.conf File"
cd /private/etc/apache2/extra
sudo cp httpd-vhosts.conf httpd-vhosts.conf.backup

#copy httpd-vhosts.conf file from originals extra folder
echo "*******************************   Copying New httpd-vhosts.conf File"
cd /private/etc/apache2/original/extra
sudo cp httpd-vhosts.conf /private/etc/apache2/extra/httpd-vhosts.conf

#remove the temp folder
echo "*******************************   Remove the temp folder"
rm -R ~/Desktop/apache-temp

echo "*******************************   Starting Apache Server"
sudo apachectl start

echo "*******************************   Done"

Apache was restored, but the httpd.conf file in /etc/apache2 doesn’t seem to look like the httpd.conf Leopard comes with. As a result I can’t follow most of the Leopard specific guides on the internet. Is there any way by which I could restore Apache 2 + PHP to Leopard defaults?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T16:58:58+00:00Added an answer on May 11, 2026 at 4:58 pm

    what I ended up doing when I had a similar situation was to pull the files I needed out of the pkg files on the OS X install disk. I believe the relevant files live in a package named BSD, which you can extract using unpkg. Then, find the files you want and copy them to the installed locations by hand.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 123k
  • Answers 123k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer to make the size of text element bigger, insert all… May 12, 2026 at 1:03 am
  • Editorial Team
    Editorial Team added an answer Install sphinx. $ easy_install -U Sphinx May 12, 2026 at 1:03 am
  • Editorial Team
    Editorial Team added an answer Groups that have no members (for the many-many pairing): SELECT… May 12, 2026 at 1:03 am

Related Questions

I used this guide on Apple's website to enable PHP on my computer but
(I have read Apple's memory management guide, as well as other memory management help
I have used the following article as a guide to creating a custom EditorPart
So I am following this guide: http://technotes.1000lines.net/?p=23 and I am going through the steps.
I've recently been lifted out of the .Net world into the Java world and

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.