Support the ongoing development of Laravel.io →
Installation Configuration
Last updated 2 years ago.
0

You should have a domain pointing to that virtual host in order to access it

Right after

DocumentRoot /var/www/html/myfirstproject/public

You should add your domain name directive

ServerName www.example.com

http://httpd.apache.org/docs/current/vhosts/examples.html

Last updated 2 years ago.
0

Thanks I added the

ServerName localhost

And now their is no longer a directory listing, but instead I have

Error in exception handler

Either with or without /public in the url.

Any other thoughts?

Last updated 2 years ago.
0
  1. Try using
ServerName test.app
  1. Add this line to your hosts file (/etc/hosts)
127.0.0.1 test.app
  1. Restart apache server
  2. Point your browser to test.app
Last updated 2 years ago.
0

K, that worked, but not exactly sure why?

I find it strange the my other entries in the hosts file are not being resolved in the same fashion?
127.0.0.1 localhost 127.0.1.1 Ghost64 127.0.1.1 projects.local 127.0.0.1 test.app

Last updated 2 years ago.
0

They work, but they also must be resolved by the web server. If you want apache to respond to another domain, add a proper virtual host.

Please add only an entry on line in the hosts file.

127.0.0.1 localhost 
127.0.1.1 Ghost64 
127.0.1.1 projects.local 
127.0.0.1 test.app

You can check if your hosts file entries work by pinging each entry

ping localhost
ping Ghost64
Last updated 2 years ago.
0

Thanks they are there but for some reason are not resolving

Strange.

Thanks for your help again, and I am good to go now.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Nexxsys nexxsys Joined 30 Nov 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.