[英]PHP doesn't work on virtual host in EC2 + ubuntu + apache2
PHP 不起作用。
開發環境如下。
如果我設置 DocumentRoot /var/www/html
,php 運行良好。
另一方面,如果我設置/home/ubuntu/public_html
,php 不起作用,但 html 起作用。
$ vi /etc/apache2/sites-available/000-default.conf
ServerAdmin webmaster@localhost
DocumentRoot /home/ubuntu/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
我通過以下方法解決了它。
須藤vi /etc/apache2/mods-enabled/php5.conf
▼之前
php_admin_flag 引擎關閉
▼變化
php_admin_flag 引擎開啟
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.