pages tagged Apache HTTP Server http://meng6net.localhost/tag/Apache_HTTP_Server/ <p><small>Copyright © 2005-2020 by <code>Meng Lu &lt;lumeng3@gmail.com&gt;</code></small></p> Meng Lu's home page ikiwiki Sat, 13 Oct 2018 03:33:59 +0000 Installing and configuring Apache HTTP Server on macOS http://meng6net.localhost/computing/installing_and_configuring/installing_and_configuring_Apache_HTTP_Server_on_macOS/ http://meng6net.localhost/computing/installing_and_configuring/installing_and_configuring_Apache_HTTP_Server_on_macOS/ Apache HTTP Server computing configuration documentation installation macOS note software Tue, 16 May 2017 23:59:39 +0000 2018-10-13T03:33:59Z <h2>previous version of Apache configuration files</h2> <h2>Apache configuration file</h2> <pre><code>$ cd /etc/apache2/users $ touch "${USERNAME}.conf" $ sudo chmod 644 "${USERNAME}.conf" </code></pre> <p>The configuration file <code>"${USERNAME}.conf"</code>:</p> <pre><code>&lt;Directory "/Users/XXX/Sites/"&gt; AllowOverride All Options Indexes MultiViews FollowSymLinks Require all granted &lt;/Directory&gt; </code></pre> <h2><code>/etc/apache2/httpd.conf</code></h2> <pre> <code>LoadModule authz_host_module libexec/apache2/mod_authz_host.so LoadModule authz_core_module libexec/apache2/mod_authz_core.so LoadModule userdir_module libexec/apache2/mod_userdir.so LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so Include /private/etc/apache2/extra/httpd-userdir.conf Include /private/etc/apache2/extra/httpd-vhosts.conf </code></pre> <h2><code>/etc/apache2/extra/httpd-userdir.conf</code></h2> <pre><code>Include /private/etc/apache2/users/*.conf </code></pre> <h2>Restarting Apache server</h2> <pre><code>$ sudo apachectl restart </code></pre> <h2>References</h2> <ul> <li> <p>John Foderaro, <a href= "https://medium.com/@JohnFoderaro/how-to-set-up-apache-in-macos-sierra-10-12-bca5a5dfffba"> How to Set up Apache in macOS Sierra 10.12</a>, 2016.</p> </li> <li> <p><a href= "https://serverfault.com/questions/520195/how-does-servername-and-serveralias-work"> How does ServerName and ServerAlias work?</a></p> </li> <li> <p><a href= "https://wiki.apache.org/httpd/CommonMisconfigurations">Common Apache Misconfigurations</a></p> </li> </ul>