Apache virtual contents configuratiion
来源:互联网 发布:博德之门 知乎 编辑:程序博客网 时间:2024/05/16 06:42
在IIS和PWS中,该设置是通过图形界面进行的,在Apache中是编辑httpd.conf文件(该文件一般不要轻易改动),在该文件中加一行
Alias /test/ "c:/php/test/"
表示将c:/php/test/目录设置为虚拟目录/test/,那么在c:/php/test/下的文件,就可以通过在浏览器中输入“http://117.0.0.1/test/文件”访问。
使Apache支持PHP
使Apache支持PHP,还需以下配置
在httpd.conf文件中加入以下几行:
ScriptAlias /php3/ "c:/php3/"
AddType application/x-httpd-php3 .php
Action application/x-httpd-php3 "/php3/php.exe"
如果想将php文件后缀改为其它的也可以,将第二行中的最后几个字“.php”改为想要的后缀即可,
想支持更多的文件,也可以,eg:
ScriptAlias /php3/ "c:/php3/"
AddType application/x-httpd-php3 .php
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php3 .phtml
Action application/x-httpd-php3 "/php3/php.exe"
then,reboot Apache,and do a test 。
write a simple php file (hello.php) under the virtual contents of "test"
<?
echo "Hello World!";
?>
enter "http://117.0.0.1/test/hello.php" in the address,
use
<? phpinfo() ?>
to check the php configuration.
- Apache virtual contents configuratiion
- apache openoffice Creating a table of contents
- This Virtual Directory does not allow contents to be listed.
- Apache Virtual Host Configuration
- Apache Virtual Include
- Ubuntu apache Virtual Host
- apache virtual host
- apache-virtual host
- Apache Virtual Host documentation(Apache Virtual Host 文档) Version 2.2
- widows下APACHE Virtual配置
- Apache 搭建HTTPS Virtual Host
- Use virtual host in Apache
- XAMPP Apache 设置virtual host
- 网站报错This Virtual Directory does not allow contents to be listed
- 解决IIS错误:Directory Listing Denied This Virtual Directory does not allow contents to be listed.
- Directory Listing Denied This Virtual Directory does not allow contents to be listed.
- Apache 虚拟目录 Virtual Directory 和虚拟主机 Virtual Host 设置
- this Virtual Directory does not allow contents to be listed. 网站默认文档没有加入对应的比如index.html
- myfaces jsf使用技巧荟萃
- dotnetcoding 代码生成器
- 初识桑椹
- 女人50万年的进化(狗狗)
- 深入Managed DirectX9(一)
- Apache virtual contents configuratiion
- Visual C++ 基础
- 终于,the Certificated Software Designing Engineer~~
- 天将降大任于是人
- 深入Managed DirectX9(二)
- 破解了MD5我们还有什么出路选择加密?
- 今天四六级口语考试,本来这跟我没什么大关系,可是~
- Zend Studio (php)
- Java学习从入门到精通