Files are in listing when running laravel4 project in browser - php

Hello guys I am new in Laravel framework. I have successfully install Laravel4 in wamp server in windows os. After that I create a new project in Laravel trhough command prompt like that:
c:\wampp\www> composer create-project laravel/laravel project1
And it successfully installed. But when I am running this project in the browser(google chrome and mozila) like the url:
http://localhost/project1
all the files are in listing manner.
So how do I start my project in Laravel. In many site I have shown that the are only using
http://project1.dev/
but when i am using it can't find the server. Please help me out.
Thanks in advance.

Try http://localhost/project1/public
To get it running from http://project1.dev you'll need to create a VirtualHost (also known as vhost in your webserver (wamp). Here's a tutorial: http://www.codeforest.net/multiple-virtual-hosts-in-wamp

Related

Trying run working Laravel project on my PC via XAMPP

I have a whole project with database, everything is working here.
Project with database
I would like to run website so I can see changes I have made.
Im using XAMPP. My configs for VirtualHost hosts and http-vghosts.conf
I have tried this https://youtu.be/iXYCnYRalaw?t=2m13s ->> from [2:13] to [4:22]
using XAMPP, but still cant run it.
Can you give me any advice or steps how to make website run on my PC? [ofcourse just for me (VirtualHost)].
Editor using: Atom
My PC spec
If running laravel appliation inside XAMPP htdocs folder is really necessary, then could you provide some kind of error, simply telling "it doesn't work" doesn't help at all.
One thing you can try is to open command prompt inside laravel folder and run
php artisan serve
This will open local server that runs current project in:
http://127.0.0.1:8000
Also, checking laravel minimum requirements is something you should check out. 5.5 requires PHP 7 and you didnt tell what XAMPP version you are running.

Which directory should I locate the PHP project in to make it work with XAMPP?

I installed XAMPP on my Macbook, and now I try to upload a PHP project to build an Android application that communicates with and uses MySQL.
As a newbie, I even do not have a clue where to locate the PHP project so that the XAMPP recognises it and make it work.
In your xampp folder you will see the folder named htdocs.YOu can place your project in that htdocs folder.
You can run that project by using
localhost/yourproject_folder_name
in your browser.
Hope this will help.

Run Laravel on existing Apache server

I have a DigitalOcean server running Ubuntu 14.04. I'm using this as a host for my web-development projects.
Now I want to start using Laravel for a project of mine, but I have a question about this.
In the /var/www/html folder of Ubuntu I created a folder, let's say, "project". In this folder I installed Laravel using this tutorial. Now everything is setup I want to run Laravel so I can test it and start developing on it.
When I run the command php artisan serve from within the "project"-folder it says "running on http://localhost:8000". So it's working.
But how do I access it? When I go to http://example.com/project it just shows me the files in that folder.
So it's running on the localhost on my server. Does that mean that it is external-accesible (the url above) or how does this work? (I guess the port is also different, 8000 instead of the default 80 for Apache)
I hope the question is clear and someone can help me out.
I have a Laravel project up and running on Digital Ocean with the Ubuntu 14.04 x64 vmlinuz-3.13.0-24-generic (1221) kernal.
I don't think you should be using php artisan serve for this purpose, as that is more for your local computer if you would like to preview your webpage if you don't want to use Apache.
To get set up, I used the excellent below instructions that were incredibly helpful. As you can see, there are many steps that you should carefully follow to get things up and running.
https://github.com/susanBuck/dwa15-fall2016-notes/blob/master/01_Servers_and_Git/07_Deploy_to_Digital_Ocean.md
Let me know if that helps you, and feel free to follow up with more questions if you get stuck on a step.

How to upload and run Laravel project on host?

Hey I'm new Laravel user. Using Windows 7.
I made my project on computer, on wamp. I have migrations (create tables and etc).
I uploaded my project to my host and it's not working. That's becuase i need to use php artisan serve command in the composer. But I can't do it! Becuase it's an host.
How should I run the project when it's on host?
Please help! thakns!

Projects got affected while installing laravel

While installing laravel through terminal command, my other projects in MAMP htdocs folder got affected and they are not working.
I followed this process for installing laravel
Those directions have you symlink the "htdocs" directory to your laravel install, effectively making your htdocs directly useful only for Laravel.
You should avoid this, perhaps by creating a symlink from your laravel build to a directory within htdocs. For example, linking to a directory in htdocs called "mylaravelapp": ln -s /path/to/laravel-master /path/to/htdocs/mylaravelapp.
Lastly, consider using Vagrant or another virtual machine provider instead of MAMP for a server. You'll have to get through a learning curve (potentially), but you'll end up better for it. This creates a virtual server for you, which won't interact with any other parts of your Mac (YOu can make a server per project!).
Here is a guide to get started with Laravel 4 and Vagrant.

Categories