1. Configure Apache virtual domain name
1. Execute sudo vi/etc/apache2/httpd.conf to start configuring httpd.conf files;
Configure the Listen 80 port (default configuration), where you can modify the listening port, such as listen 81
2. Open the corresponding LoadModule corresponding LoadModule userdir_module libexec/apache2/mod_userdir.so//allow the user to provide the page from their home directory (using the "/~ Username ")
LoadModule alias_module libexec/apache2/mod_alias.so //
Provides mapping and URL redirection from different parts of the file system to the document tree |
LoadModule Authn_core_module libexec/apache2/mod_authn_core.so
LoadModule Authz_host_module libexec/apache2/mod_authz_host.so
LoadModule Userdir_module libexec/apache2/mod_userdir.so
LoadModule Alias_module libexec/apache2/mod_alias.so
Configure Apache virtual domain name scheme under Mac, and encounter pits