I'm using Laravel 5.4.36. I can access using http://localhost. But when try to acces by ip (192.168.1.X; 83.xxx.xxx.xxx or by DNS test.mydomain.com) 404 occurs.
In my httpd.conf
DocumentRoot "C:\Users\SOTECSA\Desktop\psicoreg\public"
<Directory "C:\Users\SOTECSA\Desktop\psicoreg\public">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
In my .httaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
#RewriteCond %{HTTP:Authorization} .
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
In my .env
APP_URL=http://test.mydomain.com
Routes aren't the problem because on production works perfectly on VPS (linux) and it works also in http://localhost . I think the problem is in my laptop with Windows 10 and xampp.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire