I am using MAMP on MAC OSX.
I am trying to create a virtual host using the code. It is in a file named LaravelTest.conf. However I will need to place this file in apache's conf.d directory (I believe).
<VirtualHost 127.0.0.2>
DocumentRoot "/Applications/MAMP/htdocs/l4/project/public"
ServerName LaravelTest
<Directory "/path/to/laravel/project/public">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
</Directory>
</VirtualHost>
Where do I find the conf.d directory ? It is not present in /etc/apache2
Since you are using mamp, you could find the Apache configuration file at
/Applications/MAMP/conf/apache/httpd.conf
To be able to include your vhost file, you should add the following on the config
Include /path/of/LaravelTest.conf
Or you can just add an additional VirtualHost on your apache config file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With