I have a laravel
project contains an RestFull API. I want to access to this API from android studio. I use retrofit
library.When I run server through artisan
, can't access localhost
laravel
app routes to android studio.According to this question accessing-localhost-laravel-app-routes-to-android-studio-failed, I change base url to http://192.168.1.103:8000/halamooz/public/api/
and run the laravel app with apache
server.For this work, I follow this guideline Laravel practical guide for using XAMPP.Of course I don't use XAMPP
and install apache server individually. I access web route from browser but when I try to access API route from postman
or android studio I receive 404 page not founded
error.What is my mistake?
I put this lines in httpd-vhosts
file:
<VirtualHost *:80>
DocumentRoot "C:/apache/htdocs/halamooz/public"
ServerName exampledomain.com
ServerAlias exampledomain.com
<Directory "C:/apache/htdocs/halamooz/public">
AllowOverride All
Require all Granted
</Directory>
</VirtualHost>