Question

I installed Laravel on my Mac Book Pro running Mavericks to have a quick play to see what all thew fuss is about. I installed it under the directory Users\*my-username*\Sites\laravel-project. After following the beautiful instructions in the Laravel docs and installing through composer I was up and running, serving the site via php artisan serve and opening localhost:8000/ in my browser.

Since completing this, all of my existing projects that had been setup in vhosts no longer resolve to anything. It is as if apache is not even looking at the vhosts file.

I have checked the path for vhosts in http.conf which is currently Include /private/etc/apache2/extra/httpd-vhosts.conf

I have confirmed that the vhosts file syntax is correct by running apachectl -S where all of my hosts appear to be being read correctly.

Tried restarting apache, even did a full system reboot. Still no joy.

BTW - this question is a duplicate of this question here but nothing in there has solved my issue and the post has stagnated.

I am pulling my hair out over this, i would not have thought anything in the installation process would have caused this... I must be missing a something simple...

Était-ce utile?

La solution

For those getting the same issue I - I have worked it out. It turns out that apache was silently failing when trying to write to a non-existent log file (my bad) in my Laravel project.

<VirtualHost *:80> ServerName laravel-project.dev ServerAdmin nick@localhost.com DocumentRoot "/Users/*user*/Sites/laravel-project/" ErrorLog "/Users/*user*/Sites/laravel-project/logs/error-log" CustomLog "/Users/*user*/Sites/laravel-project/logs/access-log" common </VirtualHost>

I rmoeved this entry from my hosts and now everything is hunky-dory again.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top