[英]Internal server error when set up Laravel
I try to make a site using Laravel. 我尝试使用Laravel创建一个站点。 When I put Laravel to "www" folder and browse
当我将Laravel放入“ www”文件夹并浏览时
localhost/laravel/public then I get a internal server error.
本地主机/ Laravel的/公共然后我得到一个内部服务器错误。
In error log display the following message. 在错误日志中显示以下消息。
/var/www/laravel/public/.htaccess: Options not allowed here
/var/www/laravel/public/.htaccess:此处不允许使用选项
before put a post I saw similar problem here https://stackoverflow.com/questions/21097240/ and I didn't see any solution. 在发布帖子之前,我在这里https://stackoverflow.com/questions/21097240/看到了类似的问题,但没有任何解决方案。
This is my .htaccess file 这是我的.htaccess文件
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
You have a .htaccess file in the directory /var/www/laravel/public
with an Options
directive in the wrong place. 您在目录
/var/www/laravel/public
的.htaccess文件在错误的位置带有Options
指令。
You can only use the Options
directive in a <directory>
block. 您只能在
<directory>
块中使用Options
指令。
You need to remove it, move it to the correct place or otherwise edit the file to correct the error. 您需要将其删除,将其移动到正确的位置,或者以其他方式编辑文件以更正错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.