XAMPP Simple Virtual host configuration under Mac

Source: Internet
Author: User

Multi-domain, virtual host configuration

To turn on the virtual Host configuration option:

Open the httpd.conf file, locate the httpd-vhosts.conf line, and dismiss the line comment;

Open httpd-vhosts.conf File

Modify the following

<virtualhost *:80>
ServerName localhost
DocumentRoot "/applications/xampp/htdocs"
<directory "/applications/xampp/htdocs" >
Options Indexes FollowSymLinks includes execcgi
AllowOverride All
Require all granted
</Directory>
Errorlog "Logs/dummy-host.example.com-error_log"
Customlog "Logs/dummy-host.example.com-access_log" common
</VirtualHost>

If the directory corresponding to the need for a virtual host is not in the "/applications/xampp/htdocs", but in a folder on the desktop, you must find it in httpd.conf

<ifmodule unixd_module>

User Daemon

Group Daemon

</IfModule>

Modify ' User daemon ' to ' username '

After adding the following content

<virtualhost *:80>
ServerName localaliapp.com
DocumentRoot "/users/loganv/desktop/do/aliapp/webroot"
<directory "/users/loganv/desktop/do/aliapp/webroot" >
Options Indexes FollowSymLinks includes execcgi
AllowOverride All
Require all granted
</Directory>
Errorlog "Logs/dummy-host.example.com-error_log"
Customlog "Logs/dummy-host.example.com-access_log" common
</VirtualHost>

If 403 appears, try Chmod-r 777/users/loganv/desktop/do/aliapp/

If you do not have a real extranet domain name, you need a local

Vi/etc/hosts

Add a row

127.0.0.1 localaliapp.com

XAMPP Simple Virtual host configuration 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.