sinox配置php建立php网站
sinox配置php建立php网站
administrator [webmaster@shouji88.com] 发表于2006/05/13 21:07:47 阅读次数[4]
如果你还不会安装使用apache这个web服务器,请看文章
安装apache服务器支持cgi
下面安装apache支持php,现在已经有php4,php5了!
我的安装如下:
安装php4模块
pkg_add -r mod_php4
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.0-release/Latest/mod_php4.tbz... Done.
[activating module `php4' in /usr/local/etc/apache/httpd.conf]
cp /usr/local/etc/apache/httpd.conf.new /usr/local/etc/apache/httpd.conf
rm /usr/local/etc/apache/httpd.conf.new
***************************************************************
设置httpd.conf解释php
Make sure index.php is part of your DirectoryIndex.
You should add the following to your Apache configuration file:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
***************************************************************
用命令重启apache
sinox# /usr/local/sbin/apachectl restart
/usr/local/sbin/apachectl restart: httpd restarted
现在编辑一个php文件:
echo "hello world!"
?>
放到网站目录,然后通过网址运行,如果网页看到如下内容:
hello world!
说明支持php成功!现在你就可以把你的网站php程序放到网站目录运行了!
大家看看,在 sinox下面配置php是多么简单!