文件名写对了呀,但还是一样错。显示的页面如下:Not Acceptable An appropriate representation of the requested resource /index could not be found on this server. Available variants: index.html.ca , type text/html, language ca index.html.cz , type text/html, language cz index.html.de , type text/html, language de index.html.dk , type text/html, language da index.html.ee , type text/html, language et index.html.el , type text/html, language el index.html.en , type text/html, language en index.html.es , type text/html, language es index.html.fr , type text/html, language fr index.html.he.iso8859-8 , type text/html, language he, charset iso-8859-8 index.html.it , type text/html, language it index.html.ja.jis , type text/html, language ja, charset iso-2022-jp index.html.kr.iso-kr , type text/html, language kr, charset iso-2022-kr index.html.lu , type text/html, language ltz index.html.nl , type text/html, language nl index.html.no , type text/html, language no index.html.po.iso-pl , type text/html, language pl, charset iso-8859-2 index.html.pt , type text/html, language pt index.html.pt-br , type text/html, language pt-br index.html.ru.cp-1251 , type text/html, language ru, charset windows-1251 index.html.ru.cp866 , type text/html, language ru, charset cp866 index.html.ru.iso-ru , type text/html, language ru, charset iso-8859-5 index.html.ru.koi8-r , type text/html, language ru, charset koi8-r index.html.ru.ucs2 , type text/html, language ru, charset ucs-2 index.html.ru.ucs4 , type text/html, language ru, charset ucs-4 index.html.ru.utf8 , type text/html, language ru, charset utf-8 index.html.se , type text/html, language sv --------------------------------------------------------------------------------Apache/1.3.20 Server at localhost Port 80
修改httpd.conf DocumentRoot "c:/php4/test"<Directory "c:/php4/test"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory>
所以你把PHP文档(网页)放在其它目录下是无法打开的
设置如下:
找到: Apache-->conf-->httpd.conf在alias虚拟目录设置项下加入你要的目录:例如: Alias /icons/ "E:/Apache/Apache/icons/" //----这项Apache一般会有的
//这里加入你的虚拟目录:
Alias /ggajj.net/ "E:/wwwroot/ggajj/"----------------------------------
欢迎访问:www.ggajj.net
mtv.ggajj.net 轻松一刻,
---------------------------------
我只能打开PHP文件,html文件就说文件找不到.在httpd.conf配置文件中我也有增加addtype application/x-httpd-php-source .html这句话啊,为什么还不行?
看看文件名的大小写是不是一样!
PHP、CGI等才是需要增加的。文件名大小写也无所谓。只看你有没有把文件名写对。
An appropriate representation of the requested resource /index could not be found on this server.
Available variants: index.html.ca , type text/html, language ca
index.html.cz , type text/html, language cz
index.html.de , type text/html, language de
index.html.dk , type text/html, language da
index.html.ee , type text/html, language et
index.html.el , type text/html, language el
index.html.en , type text/html, language en
index.html.es , type text/html, language es
index.html.fr , type text/html, language fr
index.html.he.iso8859-8 , type text/html, language he, charset iso-8859-8
index.html.it , type text/html, language it
index.html.ja.jis , type text/html, language ja, charset iso-2022-jp
index.html.kr.iso-kr , type text/html, language kr, charset iso-2022-kr
index.html.lu , type text/html, language ltz
index.html.nl , type text/html, language nl
index.html.no , type text/html, language no
index.html.po.iso-pl , type text/html, language pl, charset iso-8859-2
index.html.pt , type text/html, language pt
index.html.pt-br , type text/html, language pt-br
index.html.ru.cp-1251 , type text/html, language ru, charset windows-1251
index.html.ru.cp866 , type text/html, language ru, charset cp866
index.html.ru.iso-ru , type text/html, language ru, charset iso-8859-5
index.html.ru.koi8-r , type text/html, language ru, charset koi8-r
index.html.ru.ucs2 , type text/html, language ru, charset ucs-2
index.html.ru.ucs4 , type text/html, language ru, charset ucs-4
index.html.ru.utf8 , type text/html, language ru, charset utf-8
index.html.se , type text/html, language sv --------------------------------------------------------------------------------Apache/1.3.20 Server at localhost Port 80
???
我的文件名是index,没有加什么后缀啊
用编辑器打开,然后把index.html.en文件名改为index.html
另外不用增加addtype application/x-httpd-php-source .html这句话
所以应该是缺少了这个默认首页。
我仍在等待,虽然我快没信心了......
DocumentRoot "c:/php4/test"<Directory "c:/php4/test">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>