Access Laravel website over a Local Area Network
-
Hi
I have been using laragon for some time now, but only recently I tried using a laravel script (MusicEngine). I wanted to use this as a website for my home.
I have site A (PHP script) works fine HTTP://192.168.0.104/vrajaraman_journal/However the Laravel site
HTTP://vrajaraman_music.local works. When I try accessing HTTP://192.168.0.104/vrajaraman_music/ I get a "download" file that downloads.when I type HTTP://192.168.0.104/vrajaraman_music/admin I get the address right, but the site is pointing to "$ROOT/" and not "$ROOT/public/"
I tried directions here https://forum.laragon.org/topic/2140/hosting-files-from-a-different-directory still no avail
<VirtualHost 192.168.0.104:80>
DocumentRoot "G:/Raman_Server/www/vrajaramanmusic/public/"
ServerName vrajaraman_music.local
ServerAlias *.vrajaraman_music.local
<Directory "G:/Raman_Server/www/vrajaramanmusic/public">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>If you want to use SSL, enable it by going to Menu > Apache > SSL > Enabled
======================
I then tried removing the underscore, and the site loaded like this:
HTTP://192.168.0.104/vrajaramanmusic/public
so how can I point the server to this "public" folder?
-
I tried
<VirtualHost 192.168.0.104:80>
DocumentRoot "G:/Raman_Server/www/vrajaramanmusic/public/"
ServerName vrajaraman_music.local
ServerAlias *.vrajaraman_music.local
<Directory "G:/Raman_Server/www/vrajaramanmusic/public">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>but what happened now is that all my websites pointed to vrajaraman_music.local, irrespective which site it was, so I had to remove this part from the host file