Configuration of virtual host under MAC

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.