1.找到etc/apache2/sites-availables/000-defautl.conf配置文件html
2.添加如下配置apache
<VirtualHost *:80> ... <Directory "/var/www/html/"> Options Indexes FollowSymLinks AllowOverride all Require all granted </Directory> </VirtualHost>
3.从新apache服务器服务器
4 在项目文件根目录下,添加.htaccess文件,加入以下规则ide
RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^.*$ / [L,QSA]
5.参考连接ui