Udate /etc/hosts
or c:\windows\system32\drivers\etc\hosts
file so that the new servername is mapped to 127.0.0.1
Apache config file changes document root
DocumentRoot "/Users/hoan/www"
<Directory "/Users/hoan/www">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# https://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes MultiViews FollowSymLinks
MultiviewsMatch Any
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride All
Order allow,deny
Allow from all
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
Enable vhost:
Uncomment the line: Include /private/etc/apache2/extra/httpd-vhosts.conf
Vhost files locate at: /private/etc/apache2/extra/httpd-vhosts.conf
<VirtualHost *:80>
DocumentRoot "/Users/hoandang/Sites/insieme/insieme-server/public"
ServerName api.insieme.dev
<Directory "/Users/hoandang/Sites/insieme/insieme-server/public">
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
Header set Access-Control-Allow-Headers "ORIGIN, X-REQUESTED-WITH, CONTENT-TYPE"
Header set Access-Control-Allow-Methods "POST, GET, OPTIONS, PUT, DELETE"
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Credentials true
Header set Access-Control-Max-Age 60000
</Directory>
</VirtualHost>
LoadModule php5_module /usr/local/Cellar/php53/5.3.28/libexec/apache2/libphp5.so