0

I have a problem. I build an app with Laravel on my computer (IP: 192.168.1.121), I try to access to my app with my Android phone in local network. When I try to reach 192.168.1.121/myapp/public I have a 404 not found but in my computer all work.

On another computer, I can modify host file to add

192.168.1.121     edcintra.test 

And that works perfectly.

define ROOT "C:/laragon/www/EDCIntra/public/"
define SITE "EDCIntra.test"

<VirtualHost *:80> 
    DocumentRoot "${ROOT}"
    ServerName ${SITE}
    ServerAlias *.${SITE}
    <Directory "${ROOT}">
        Options Indexes FollowSymLinks
        AllowOverride All
        allow from all
        Require all granted
    </Directory>
</VirtualHost>

<VirtualHost *:443>
    DocumentRoot "${ROOT}"
    ServerName ${SITE}
    ServerAlias *.${SITE}
    <Directory "${ROOT}">
        AllowOverride All
        Require all granted
    </Directory>

    SSLEngine on
    SSLCertificateFile      C:/laragon/etc/ssl/laragon.crt
    SSLCertificateKeyFile   C:/laragon/etc/ssl/laragon.key
 
</VirtualHost>

This is my conf in Apache... Someone already have this problem?

Joundill
  • 6,828
  • 12
  • 36
  • 50
  • This might help https://stackoverflow.com/q/4779963/2930834 – Nakul Dec 21 '21 at 20:21
  • 1
    run ```ipconfig``` and get your local IP then run ```php artisan serve --host 192.168.x.x (your ip)``` now you can access your project on ur phone using the same IP – PsyLogic Dec 21 '21 at 21:05
  • This link might have answer for your question. https://stackoverflow.com/questions/4779963/how-can-i-access-my-localhost-from-my-android-device?noredirect=1&lq=1 – SoftwareGuy Dec 21 '21 at 21:06
  • Thank you all for share this thread i don't see it before ! And really thank you PsyLogic this fixed my problem ! :) – Marvin Dahlen Dec 22 '21 at 07:53

0 Answers0