1、安裝apache2
Apache是一個廣泛使用的Web服務(wù)器軟件。在Ubuntu上,您可以使用以下命令安裝Apache:
sudo apt install -y apache2
安裝完成后,通過以下命令查看Apache版本:
sudo apache2 -v
sudo service apache2 status
2、配置apache2
為了確保Magento能夠正常運行,您需要配置Apache的重寫權(quán)限:
(1)修改 /var/www/ 目錄的 AllowOverride 屬性為 All。
(2)啟用 rewrite 模塊:
sudo a2enmod rewrite
(3)編輯Apache配置文件:
sudo vim /etc/apache2/apache2.conf
(4)重啟Apache服務(wù):
sudo service apache2 restart


