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