Reputation:
I am pretty new in Laravel and I am finding the following problem.
I have put my application in this folder:
C:\xampp\htdocs\HotelRegistration\
Starting it via the statment:
php artisan serve
it is correctly started here: http://127.0.0.1:8000
For some reason I need to run it with XAMPP Apache server instead the one provided by php artisan serve
So I started Apache from XAMPP but trying to open:
http://127.0.0.1:80/HotelRegistration/
but so the application can't start and I obtain the list of directory and file contained in this folder.
Why? What is wrong? What am I missing? Maybe something related to virtual host? How can I fix this issue?
Tnx
Upvotes: 1
Views: 11094
Reputation:
Solved by myself, I create a virtual host in Apache and using this URL works
Upvotes: 0
Reputation: 1182
php artisan serve
creates a web server that shows the public
folder of your app.
As a good practice, you should setup your hosting to show that public folder while hidding the rest of the program from unwanted visitors.
Check this links about it:
https://deployer.org/blog/how-to-deploy-laravel
For development, that isn't too much of a trouble.
Upvotes: 3
Reputation: 111
You can use the below to run your application. But it can fail to load the basic css file.
http://localhost/HotelRegistration/public/
Hope its help you.
Upvotes: 0