Valentin Tanasescu
Valentin Tanasescu

Reputation: 106

Laravel serve without affecting the other apps

I have installed Laravel 5 and I know there's no way to run 'php artisan serve' anymore.

Laravel project is in a subfolder: www.site.com/laravelProject.

Can I run this command (in my laravel project folder) from CLI:

php -S localhost/project:8000 -t public/

without affecting the other folders from live (from localhost) ?

I mean, this command will still let the other folders running and being accessed with their url?

Will still the other folders work?

Thx :)

Edit:

'php artisan serve' actually works.

But there's a problem:

user@server# php artisan serve
Laravel development server started: <http://127.0.0.1:8000>

I actually have it on remote server, not locally. How can I fix it?

Upvotes: 0

Views: 224

Answers (1)

AntoineB
AntoineB

Reputation: 4694

As stated by the answer you get when running php artisan serve, this command only starts a development server.

For production, you have to setup a Virtual Host pointing to your Laravel application.

An example Virtual Host for Apache would look like this:

<VirtualHost *:80>
    DocumentRoot "/Users/myName/Projects/laravel/public"
    ServerName myLaravel.dev
    <Directory "/Users/myName/Projects/laravel/public">
            AllowOverride All
            Options FollowSymLinks +Indexes
            Order allow,deny
            Allow from all
    </Directory>
</VirtualHost>

Upvotes: 1

Related Questions