The first part: httpd.conf
1: Find this paragraph and change it to the following
<directory/>
Options Indexes FollowSymLinks
AllowOverride All
Order Allow,deny
Allow from all
</Directory>
2: Locate document root and change to the following
DocumentRoot "/users/ruanwenwu/web"
<directory "/users/ruanwenwu/web" >
#
# Possible values for the Options directive is "None", "all",
# or any combination of:
# Indexes includes followsymlinks symlinksifownermatch execcgi multiviews
#
# Note that "MultiViews" must is named *explicitly*---"Options all"
# doesn ' t give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/trunk/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
# XAMPP
Options Indexes followsymlinks execcgi includes
#
# AllowOverride Controls What directives is placed in. htaccess files.
# It can be ' all ', ' None ', or any combination of the keywords:
# Options FileInfo authconfig Limit
#
#AllowOverride None
# since XAMPP 1.4:
AllowOverride All
#
# Controls who can get stuff from the this server.
#
Require all granted
</Directory>
3. Open the comment for the following code
# Virtual Hosts
Include etc/extra/httpd-vhosts.conf
The second part: http-vhost.conf configuration as follows
<virtualhost *:80>
# ServerAdmin [email protected]
DocumentRoot "/applications/xampp/xamppfiles/htdocs"
ServerName localhost
# Serveralias Www.Domain.com
# errorlog "Logs/domain-error.log"
# customlog "Logs/domain-access.log" combined
</VirtualHost>
<virtualhost *:80>
DocumentRoot "/users/ruanwenwu/web/www.doubilaile.com"
ServerName www.doubilaile.com
Rewriteengine on
Rewriterule ^/(\d+) \/?$/index/index/id/$1
<directory/>
Options Indexes FollowSymLinks
AllowOverride All
Order Allow,deny
Allow from all
</Directory>
</VirtualHost>
One configuration localhost, one to configure the host you want.
Configuration of virtual host under MAC