MAMP ist in einem MacBook installiert. Ich benutze den MAMP Apache.OS X MAMP Apache virtueller Host Laravel Projekt falsch konfiguriert
I
127.0.0.1 my-site.local
/etc/host
Datei hinzugefügt:Basierend auf viele Online-Ressourcen, ich habe folgendes getan.
Ich habe
Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
in/Applications/MAMP/conf/apache/httpd.conf
unkommentiert.In
/Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
, fügte ich<VirtualHost *:80> DocumentRoot "/Users/myname/laravel/mysite/public" ServerName my-site.local ServerAlias my-site.local <Directory "/Users/myname/laravel/mysite/public"> DirectoryIndex index.php Options +Indexes +FollowSymLinks +MultiViews AllowOverride All Require all granted </Directory> </VirtualHost>
In
/Users/myname/laravel/mysite/.htaccess
Datei:<IfModule mod_rewrite.c> Options +Indexes +FollowSymLinks +MultiViews RewriteEngine On #RewriteBase/ # Redirect Trailing Slashes If Not A Folder... #RewriteCond %{REQUEST_FILENAME} !-d #RewriteRule ^(.*)/$ /$1 [L,R=301] RewriteCond %{HTTP:Authorization} ^(.*) RewriteRule .* - [e=HTTP_AUTHORIZATION:%1] # Handle Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule^index.php [L] Require all granted </IfModule>
Immerhin localhost
, localhost/MAMP
, localhost/phpMyAdmin
, alle Arbeiten, außer den my-site.local
. Es zeigt 500 Internal server error. The server encountered an internal error or misconfiguration and was unable to complete your request.