Support the ongoing development of Laravel.io →
Installation Configuration Requests
Last updated 2 years ago.
0

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

Last updated 2 years ago.
0

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>
Last updated 2 years ago.
0

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?

Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

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?

Last updated 2 years ago.
0

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:

    1. Download XAMPP
    1. Create a new folder in c:\XAMPP\htdocs e.g. c:\xampp\htdocs\laravel
    1. Download a zip of Laravel from https://github.com/laravel/laravel.git
    1. Unzip it into the folder created in 2)
    1. Install Composer globally as described here
    1. Browse to c:\XAMPP\htdocs\laravel using command prompt
    1. Run composer install
    1. Make sure Apache is running in the XAMPP control panel
    1. Browse to http://localhost/laravel/public/index.php
Last updated 2 years ago.
0

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?

Last updated 2 years ago.
0

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?

Last updated 2 years ago.
0

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?

Last updated 2 years ago.
0

Is there a config setting somewhere to enable pretty URLs?

Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

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:

Last updated 2 years ago.
0

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......

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

sparkietm sparkietm Joined 10 May 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.