简体   繁体   中英

Ubuntu LAMP Virtual Host - Apache 500 Internal Error

I create a virtual host using virtualhost.sh script (you can find it easily on GitHub), and mapped it to the root of my project folder (Yii2 Project), when I visit my virtual host, I got Apache 500 Internal Error.

Ubuntu LAMP

Thanks

The problem was in the rewrite module wasn't enabled by default when you install LAMP manually, and the .htaccess file in the root directory uses RewriteEngine...

Enable rewrite module: sudo a2enmod rewrite

Then, you need to restart your Apache: sudo service apache2 restart

Done.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM