I posted this question but was told I might get better results on superuser. So here goes: I mistakingly deleted the /etc/apache2 folder and screwed up apache. I want to re-install the stock Apache to put this directory back, is there a way to do this from the Snow Leopard install disc? If not, how can I do this? All links I'm finding don't explain how to install it. The only alternative I found is to use macports, so that is my worst case, but I'd like to fix my install. I'd actually prefer to re-install the operating system than use macports to avoid the problem.
MacOS Update: While these instructions still work, there are new posts for recent versions of macOS, the latest being Install Apache, PHP, and MySQL on macOS Mojave. I have installed Apache, PHP, and MySQL on Mac OS X since Leopard. Each time doing so by hand. Each version of Mac OS X having some minor difference. How do I install XAMPP for Mac OS X? To install XAMPP, follow these steps: Open the DMG-Image. The LAMPP startup script did not start XAMPP-Apache because there is an Apache instance already running. To start XAMPP properly, first you have to stop this daemon.
![For For](https://clashersplanet.com/wp-content/uploads/2018/08/Screenshot_1652.png)
Someone directed me to link, but it didn't put the folder /etc/apache2 back, so I'm still getting the same errors when I try to start apache. I want to restore or replace the stock version. UPDATE: NOTE: This is definitely not best practice, and it didn't completely solve my problem.
![Install apache mac os x el capitan Install apache mac os x el capitan](/uploads/1/2/5/6/125613891/470053821.jpg)
What I ended up doing is copying the directory /etc/apache2 and its contents from someone else's mac. I had to rename one file /etc/apache2/users/ home-name.conf and edit its contents to account for that change.
Now, when running any sudo apachectl command such as sudo apachectl -k restart, i am getting this error: /usr/sbin/apachectl: line 82: ulimit: open files: cannot modify limit: Invalid argument Any ideas?