Laravel POST在apache2中不工作


Laravel POST not working in apache2

我目前正在使用Laravel框架开发一个web应用程序,并使用php工匠服务工具,我已经检查了链接是否相应工作。我在apache下测试了这个,它没有相应地工作,所以我为应用程序设置了mod重写启用,现在它适用于我在浏览器中键入的所有url。然而,每当我尝试处理POST路由时,它们根本没有被处理,并且我在浏览器控制台中得到500内部服务器错误。这个问题的可能解决方案是什么?

edit 1:-为了进一步澄清问题,到目前为止,我使用的所有路由都是在使用php artisan serve提供的测试服务器时工作的。

因此,这里是我的000_default.conf用于测试:

<VirtualHost *:80>
    <Directory /var/www/html>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
    </Directory>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet 

在表单中添加这个标记

<input type="hidden" name="_token" value="{{ csrf_token() }}">