0
votes

i have an issue that i want to run my laravel project without cmd command php artisan serve , i want something like usually in php project localhost/projectName , when i do all the steps like changing hosts in System32/driver/etc/hosts and changing E:\wamp\bin\apache\apache2.4.33\conf\extra\httpd-vhosts.conf with all recommended option i restart wamp but when i put on the url projectname.dev the cercle above browser still Spins and nothing displays in the browser!!!! someone has any idea

the configurations is

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "E:\wamp\www\AhssanStore\public"
    ServerName ahssanstore.dev
    ServerAlias www.ahssanstore.dev
    ErrorLog logs/ahssanstore.dev-error.log
    CustomLog logs/ahssanstore.dev-access.log common  
<Directory "E:\wamp\www\AhssanStore\public">
    AllowOverride all
    Require all granted
    </Directory>
</VirtualHost>

and in C:\Windows\System32\drivers\etc i add 127.0.0.1 ahssanstore.dev

and i restart wamp and after that i navigate to localhost/ahssanstore.dev

3
Please show the configs you have used. - Jerodev
i put the configs bro , you can see them now - fouadmad

3 Answers

1
votes

For those that have an Ubuntu Dev Server (with the possibility of other projects in your /var/www) I did the following to make it work.

Rename your-app/server.php to your-app/index.php Copy .htaccess from your-app/public/ to your-app/

PS: If anyone knows that this creates some problems down the line please advice.

Done

0
votes

For windows, you can try use Laragon.

0
votes

Sometimes, servername: 'projectname.dev' doesn't work (I'm used to meet like this). Try changing 'projectname.me' instead 'project.dev'.

For VirtualHost configuration, you only need to set two lines:

<VirtualHost *:80>
     DocumentRoot "E:\wamp\www\AhssanStore\public"
     ServerName ahssanstore.dev
</VirtualHost>

Just Sharing my knowledge. Hope it also works!