0
<VirtualHost *:80>
ServerAdmin webmaster@hujjaj.dev
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.

Aine
  • 2,638
  • 3
  • 30
  • 40
usama
  • 71
  • 9
  • https://stackoverflow.com/questions/28788285/how-to-run-laravel-without-artisan Hope It will help You! – void Mar 30 '20 at 10:13
  • Does this answer your question? [How to run Laravel without Artisan?](https://stackoverflow.com/questions/28788285/how-to-run-laravel-without-artisan) – Basel Issmail Mar 30 '20 at 10:27
  • you should add this to your hosts file `127.0.0.1 hujjaj.dev` file path `c:\windows\system32\drivers\etc\hosts` and then go to hujjaj.dev directly without localhost – Achraf Khouadja Mar 30 '20 at 15:19

2 Answers2

1

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

Rijosh
  • 1,538
  • 1
  • 8
  • 11
  • Fine and Thanks Rijosh I try this and its working at 127.0.0.2 but my site pictures are not showing as i used storage for picture saving. please guide me – usama Mar 30 '20 at 11:01
  • Storage image paths cannot be shown unless you set 777 permission for the directory. You can add storage link to the public using command `php artisan storage:link`. Now you can use the storage file links directly. – Rijosh Mar 30 '20 at 11:31
0

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

dipenparmar12
  • 3,042
  • 1
  • 29
  • 39