티스토리 뷰

OpenSUSE 11 Apache2 Use PHP Scripts


Use PHP Scripts

 

Configure Apache2 to use PHP scripts.



1. Install PHP.


www:~ # zypper -n install php53 php53-pear apache2-mod_php53

www:~ # a2enmod php53 

www:~ # vi /etc/php5/cli/php.ini

# line 1008: set your timezone

date.timezone = 'Asia/Tokyo'

www:~ # /etc/init.d/apache2 restart 




2. Create a PHP test page and access to it from client PC with web browser. It's OK if following page is shown.


www:~ # vi /srv/www/htdocs/index.php

<html>

<body>

<div style="width: 100%; font-size: 40px; font-weight: bold; text-align:center;">

<?php

      print "PHP Test Page";

?>

</div>

</body>

</html>



3. Access to 'http://(your server's name or IP address)/index.php



저작자 표시 비영리 변경 금지
신고
댓글