<p>Mac OS X ships with apache pre-installed, but the files are in non-standard locations.  This question is a place to collect information about where configuration files live, and how to tweak the apache installation to do things like serve php pages.</p>

[{'answer_id': 69784, 'author': 'ctcherry', 'author_id': 10322, 'author_profile': 'https://Stackoverflow.com/users/10322', 'pm_score': 5, 'selected': True, 'text': '<p>Apache Config file is: /private/etc/apache2/httpd.conf</p>\n\n<p>Default DocumentRoot is: /Library/Webserver/Documents/</p>\n\n<p>To enable PHP, at around line 114 (maybe) in the /private/etc/apache2/httpd.conf file is the following line:</p>\n\n<pre><code>#LoadModule php5_module     libexec/apache2/libphp5.so\n</code></pre>\n\n<p>Remove the pound sign to uncomment the line so now it looks like this:</p>\n\n<pre><code>LoadModule php5_module     libexec/apache2/libphp5.so\n</code></pre>\n\n<p>Restart Apache: System Preferences -> Sharing -> Un-check "Web Sharing" and re-check it. \n<strong>OR</strong> </p>\n\n<pre><code>$ sudo apachectl restart\n</code></pre>\n'}, {'answer_id': 69798, 'author': 'Larry OBrien', 'author_id': 10116, 'author_profile': 'https://Stackoverflow.com/users/10116', 'pm_score': 1, 'selected': False, 'text': '<p>httpd.conf is in /private/etc/apache2</p>\n\n<p>Enable PHP by uncommenting line:</p>\n\n<pre><code> LoadModule php5_module        libexec/apache2/libphp5.so\n</code></pre>\n'}, {'answer_id': 71560, 'author': 'Patrick', 'author_id': 11884, 'author_profile': 'https://Stackoverflow.com/users/11884', 'pm_score': 4, 'selected': False, 'text': '<p>Running </p>\n\n<p>$ httpd -V</p>\n\n<p>will show you lots of useful server information, including where the httpd.conf file can be found.</p>\n'}, {'answer_id': 72143, 'author': 'Michael Cramer', 'author_id': 1496728, 'author_profile': 'https://Stackoverflow.com/users/1496728', 'pm_score': 1, 'selected': False, 'text': '<p><strong>/etc/httpd/users</strong> contains user-specific configuration files which can be used to override the global configuration. For example, adding "<strong>AddHandler server-parsed html</strong>" to the <strong>&lt;Directory&gt;</strong> block in the <strong>/etc/httpd/users/*.conf</strong> file that corresponds to one user will enable mod_include parsing of HTML files for that particular user\'s <strong>$HOME/Sites</strong> directory, but nowhere else.</p>\n'}, {'answer_id': 6964273, 'author': 'Scott Willeke', 'author_id': 51061, 'author_profile': 'https://Stackoverflow.com/users/51061', 'pm_score': 2, 'selected': False, 'text': '<p>To get SSI/includes (mod_include) to work I found I had to edit <code>/private/etc/apache2/users/myusername.conf</code> and change <code>AllowOverride None</code> to <code>AllowOverride All</code>.</p>\n\n<p>Then add the following in a .htaccess file in the root of your site:</p>\n\n<pre><code>Options +Includes\nAddType text/html .html\nAddOutputFilter INCLUDES .html\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/69768', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3575/']