I'm using Mac so I'm working with MAMP.
In /MAMP/conf/apache/httpd.config I did uncomment the second line:
#Virtual hosts
Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
Then in /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf I made this:
<VirtualHost *:80>
DocumentRoot "/Applications/MAMP/htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/User/xxxxx/Sites/mysite"
ServerName mysite
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/Applications/MAMP/htdocs/laravel-blog/public"
ServerName laravel-blog.dev
</VirtualHost>
And my etc/hosts looks like this:
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
127.0.0.1 mysite
127.0.0.1 laravel-blog.dev
so when I go to mysite:8888/ this redirects me to a page called 'Index of /' with all the folders that I have in htdocs
but when I go to laravel-blog.dev:8888/ it says the page failed to open
so I changed it: instead of laravel-blog.dev , I just used laravel-blog, changed it also in my /etc/hosts and in httpd-vhosts.conf file
and now when I go to laravel-blog:8888/ it redirects me back to this "Index of /" page, even tho the DocumentRoot is set to /Applications/MAMP/htdocs/laravel-blog/public
I have searched for hours and tried a lot of things but still nothing seems to redirect me to the '/public' page of an application, only redirects me back to the 'Index' which is the htdocs.
Anyone an explanation for this? how i can get to '/public'? And why laravel-blog.dev is not accepted but laravel-blog is? what has that .dev to do with anything?