啟動 Apache
1.設定開機啟動 Apache
# chmod 755 /etc/rc.httpd
2.啟動 Apache
apachectl start
3.測試
開啟瀏覽器 http://ip
出現  [ It works! ]    表示正常工作
啟動PHP
1.編修 /etc/httpd/httpd.conf 設定檔
# vi /etc/httpd/httpd.conf找到#Include /etc/httpd/mod_php.conf將#字號去除,變Include /etc/httpd/mod_php.conf找到DirectoryIndex index.html在最後面加上 index.php,變成DirectoryIndex index.html index.php找到Options FollowSymLinks全部改成Options -FollowSymLinks
3.重新啟動 Apache
apachectl  restat
4.測試php
# vi /srv/www/htdocs/2.php輸入<?php phpinfo(); ?>
  開啟瀏覽器http://ip/2.php
  有顯示php相關資訊表示 php 也有啟動