Setting up a virtual host on XAMPP on Mac

后端 未结 3 1913
栀梦
栀梦 2021-02-06 15:34

I am trying to set up a virtualhost on my apple mac on localhost. The server is provided by XAMPP, which bundles Apache/MySQL/PHP in one bundle.

Here is what I have done

3条回答
  •  时光说笑
    2021-02-06 16:03

    On xampp you need to edit 3 files to setup virtual hosts

    the /etc/hosts and /Applications/XAMPP/etc/extra/httpd-vhosts.conf as you did.

    But also you need to edit /Applications/XAMPP/xamppfiles/etc/httpd.conf to include the http-vhosts.conf

    make sure you have uncommented this line

    # Virtual hosts
    Include /Applications/XAMPP/etc/extra/httpd-vhosts.conf
    

    EDIT

    Have you tried to add this lines

    Order allow,deny
    Allow from all
    

    Just before the

    AllowOverride All
    

提交回复
热议问题