How to create virtual hosts in MAMP?

后端 未结 6 1139
我寻月下人不归
我寻月下人不归 2020-12-05 00:35

I am new to Mac but used Ubuntu for development for a long time. I know how to create virtual hosts in Ubuntu but have no idea about Mac. I have created a hosts

6条回答
  •  遥遥无期
    2020-12-05 01:26

    I followed this post, as recommended by szatti1489, and it worked for me: https://www.taniarascia.com/setting-up-virtual-hosts/

    A couple of points are worth mentioning though:

    • This line didn't already exist in my httpd.conf file, I had to add it: Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
    • I had to use the .test domain ending, not .dev for my VirtualHost ServerName. The post mentions this, but then continues using.dev. Apparently, Chrome didn't support the .dev domain ending after 2017, although it didn't work in Firefox or Safari for me either.

提交回复
热议问题