install apache2
apt-get update
apt-get install -y apache2
open web brower: http://172.17.71.216
//if can't open this page, use `service apache2 restart` then retry
install php
- apt-get install -y php5 libapache2-mod-php5
- vim /var/www/html/test.php with
<?php
phpinfo();
?>
- test http://172.17.71.216/test.php
maintain apache
clear log
service apache2 stop
rm -rf /var/log/apache2/*
touch error.log && touch access.log && touch other_vhosts_access.log
chmod 777 error.log && chmod 777 access.log && chmod 777 other_vhosts_access.log
service apache2 start
No comments:
Post a Comment