usama
usama

Reputation: 71

How can I run my Laravel project without cmd command "php artisan serve"?

<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "C:\xampp\htdocs\hujjaj_app_new\public"
ServerName hujjaj.dev
ErrorLog "logs/hujjaj.dev-error.log"
CustomLog "logs/hujjaj.dev-access.log" common

I am doing so in my virtual host file and update 127.0.0.1 hujjaj.dev then i restart XAMPP and after that I navigate to localhost/hujjaj.dev but showing 404|Not Found.

Upvotes: 0

Views: 2184

Answers (2)

dipenparmar12
dipenparmar12

Reputation: 3455

Yes, There is another way to run laravel project, with following command..

php -S 127.0.0.1:8001 server.php

This will run your application at 127.0.0.1:8001 mentioned address.

Note: laravel default entry point is server.php thats why we mentioned it. other wise it will be index.php

Upvotes: 0

Rijosh
Rijosh

Reputation: 1544

Please try the following

<VirtualHost 127.0.0.2:80>
  DocumentRoot “D:\laravel-gkb\public”
  DirectoryIndex index.php
  ServerName laravel-gkb.test
  <Directory “D:\laravel-gkb\public”>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Order Deny,Allow
    Allow from all
    Require all granted
  </Directory>
</VirtualHost>

Then add the save domain in your hosts file

127.0.0.2 hujjaj.dev

Refer this for more details : link

Upvotes: 1

Related Questions