0

I use Windows 10 and XAMPP for local development. I want to create project on laravel 5.5 and access it in browser by project.dev

I add next lines to httpd-vhosts.conf file

<VirtualHost project.dev:80>
    DocumentRoot "C:\xampp7\htdocs\server\laravel\project_name\public"
    ServerAdmin project.dev
    <Directory "C:\xampp7\htdocs\server\laravel\project_name">
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
   </Directory>
</VirtualHost>

and

127.0.0.1       project.dev

to hosts file. But it does not work (only for laravel),I get 400 error. This works with all the rest my local projects except those ones on laravel.

I have no problem with access to this project by

http://localhost/server/laravel/project_name/public

What other settings do I have to make to access laravel 5.5 project like project.dev?

1 Answer 1

2

1- change VirtualHost project.dev:80 to VirtualHost *:80
2- change ServerAdmin project.dev to ServerName project.dev
and after these changes restart your apache service

Sign up to request clarification or add additional context in comments.

2 Comments

unfortunatelly it didn't work. I still get the same 400 error and now I can't access it even with localhost/server/laravel/project_name/public
Is this the very first virtual-host you created? Because if you use virtual-hosts thrn you have to create a virtual host for localhost as well. Otherwise calling localhost will not work. Also did you try putting public in the Directory-path as well?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.