Home > Database > Mysql Tutorial > body text

Apache 2.2 使用经验谈,不易被发现的小错误会造成大问题

WBOY
Release: 2016-06-07 15:44:12
Original
1006 people have browsed it

在conf/httpd.conf中的任意位置放上这句话,一般在最后 #dede的虚拟路径 Alias /dede/ "D:/downloads/sitefiles_080630051316/" Directory "D:/downloads/sitefiles_080630051316/" Options FollowSymlinks MultiViews AllowOverride None Order allow,deny

  在conf/httpd.conf中的任意位置放上这句话,一般在最后

#dede的虚拟路径
Alias  /dede/  "D:/downloads/sitefiles_080630051316/" 
 
Options FollowSymlinks  MultiViews
AllowOverride None
Order  allow,deny 
Allow  from  all

注意那个 Alias 后面写/dede或者/dede/都可以,但是物理路径后面要加/,如"D:/downloads/sitefiles_080630051316/" ,不然会出现403

错误,说是没有访问的权限

注意:

1、php托盘控制的图标的restart功能有时候不好使,当你觉得不对劲的时候,比如网站老是打不开,就试着先stop再start。

2、如果定义了根目录的虚拟路径,要注意在httpd.conf中虚拟路径摆放的位置

比如这样摆放就能够访问到A也能够放问到B:

#A的虚拟路径
Alias /aaa "D:/aaa/"

    Options MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all

#B的虚拟路径,B的虚拟路径跟根目录重叠了
Alias / "D:/bbb/"

    Options MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all

但是如果把A放到B之后就变成只能访问到B而不能访问到A,比如:

#B的虚拟路径,B的虚拟路径跟根目录重叠了
Alias / "D:/bbb/"

    Options MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all

#A的虚拟路径
Alias /aaa "D:/aaa/"

    Options MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!