Hey,
If you browse to http://localhost/mydomain/public does that work?
Laravel routes all requests through /public/index.php so you'll need to set your document root to c:/apache/htdocs/mydomain/public
Sam
Hey, thanks for replying. No indeed. That gives me "The requested URL /index.php was not found on this server."
VirtualHost entry is now:
<VirtualHost 127.0.0.1:80>
PHPINIDir c:/php
DocumentRoot "c:/apache/htdocs/sortedsounds/public"
<Directory "c:/apache/htdocs/sortedsounds/public">
AllowOverride All
</Directory>
</VirtualHost>
Hmm, i don't have a MAMP/XAMPP install vhost to share but my test server one looks like so: (server name changed)
<VirtualHost *:80>
ServerName test.co.uk
ServerAlias www.test.co.uk
DocumentRoot /var/www/vhosts/test.co.uk/public
<Directory /var/www/vhosts/test.co.uk/public>
Options -Indexes FollowSymLinks -MultiViews
AllowOverride All
</Directory>
</VirtualHost>
Your .htaccess file is sitting within the /public folder right?
That went well. Cleared down the htdocs folder. Now when I run composer create-project laravel/laravel your-project-name --prefer-dist I get "php is not recognized as an internal or external. Truly truly had enough. Shouldn't be this hard.
OK the excruciating journey continues. Hosed everything and went the WAMP server route. Ran composer to install Laravel to MyDomain folder. No errors reported. I enabled mod_rewrite in httpd.conf . Went to MyDomain root in the browser and got 'Whoops ... '
I'd love to be able go into work on Monday and say 'Hey guys, I was playing around with an awesome new PHP framework this weekend. Something tells me that's not going to happen.
Oh and Chrome tools tell me the Whoops is in fact a 404 not found. Hey ho.
sparkietm said:
OK the excruciating journey continues. Hosed everything and went the WAMP server route. Ran composer to install Laravel to MyDomain folder. No errors reported. I enabled mod_rewrite in httpd.conf . Went to MyDomain root in the browser and got 'Whoops ... '
I'd love to be able go into work on Monday and say 'Hey guys, I was playing around with an awesome new PHP framework this weekend. Something tells me that's not going to happen.
Oh and Chrome tools tell me the Whoops is in fact a 404 not found. Hey ho.
Can you check the bottom of your /storage/logs/laravel.log and see what error is being reported there?
Sorry to hear you're having problems, initial set up can be a bit messy, especially on Windows. I've had no trouble getting it to work with XAMPP a while ago with (roughly) the following steps:
Good call, there's this in the log.
[2014-05-10 22:25:50] production.ERROR: exception 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException' in C:\wamp\www\sortedsounds\bootstrap\compiled.php:5289
Would that kill routing?
sparkietm said:
Good call, there's this in the log.
[2014-05-10 22:25:50] production.ERROR: exception 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException' in C:\wamp\www\sortedsounds\bootstrap\compiled.php:5289
Would that kill routing?
That's the error I see when I don't have a matching route, do you have routes set up?
Looking at routes.php I'd say you should be able to get hello out of the box, no?
Route::get('/', function() { return View::make('hello'); });
i.e domain route maps to hello?
Is there a config setting somewhere to enable pretty URLs?
Have you changed your original virtualhost (from the post about 9 hours ago)? As that is pointing at a different directory than the exception error you just posted.
Pretty URLs are enabled by the mod_rewrite extension being enabled in PHP, if it's not on - you need to enable it and restart Apache.
OK progress. Looks like I'm not quite there on my understanding of doc root and server root...
If I navigate to localhost I get " You have arrived" (calm down it's just a PHP framework :) If I go to localhost/MyDomain I get Whoops.
So do I need a virtualhost entry for MyDomain?
Anyway, on that minor success I'm off to bed. Weekend hasn't been a complete washout, then. Thanks large for your help, guys.
You don't need a virtualhost, but if you're going to develop more than one site/project it is a good idea. If you changed the server root, you've essentially made "localhost" point into that one Laravel project.
I would suggest pausing, and reading up on VirtualHosts:
To answer AndrewBNZ, yes, I did a reinstall using WAMP so the earlier exception is out of whack. Still not quite sure what the httpd.conf documentroot value should be.
My local setup is
c:/wamp/www/sortedsounds/
I'd like my Laravel routing engine to see this as the base url or domain root.
Looks like I'm getting there, though.
Thanks again. We'll pick this up tomorrow :) Must ...... sleep......
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community