
第一步:注销,如下样式:
#DocumentRoot "C:/myenv/apache/htdocs"
第二步:启动虚拟主机的配置,如下样式:
Include conf/extra/httpd-vhosts.conf
第三步:配置httpd-vhosts.conf,增加如下样式:
<VirtualHost *:80>
DocumentRoot "D:/myblog2"
ServerName seophp.example.com
DirectoryIndex test.html index.html index.htm index.php
<Directory />
Options FollowSymLinks
#AllowOverride None 不许可别人修改我们的页面
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
注意标点符号,apache对中英标点号是不检测的,但是运行会出问题。
如果不行就看一下\apache\logs\error.log转上看看。
你这些是否是多余的
《httpd.conf检查了httpd-vhosts.conf是打开的
httpd-vhosts.conf中的配置如下:
NameVirtualHost 127.0.0.1:80
<VirtualHost 127.0.0.1:80>
DocumentRoot "D:/xampp/htdocs"
ServerName localhost
</VirtualHost>
》
刚配ci,还没开始就摔倒了。已在/application/config里设了base_url为http://localhost:8081/。我的改了默认端口为8081,非ci的php页面运行正常。apache启动正常服务器类型: MySQL
服务器版本: 5.6.24 - MySQL Community Server (GPL)
协议版本: 10
服务器字符集: UTF-8 Unicode (utf8)
Apache/2.4.12 (Win32) OpenSSL/1.0.1l PHP/5.6.8
[size=13.1199998855591px]现在不管是controllers/Welcome.php或view的页面均显示403禁止访问。
[size=13.1199998855591px]已经试过在apache的httpd.conf下的
[size=13.1199998855591px]AllowOverride none
[size=13.1199998855591px]Require all denied
[size=13.1199998855591px]改成
[size=13.1199998855591px] Options FollowSymLinks
[size=13.1199998855591px]AllowOverride None
[size=13.1199998855591px]Order deny,allow
[size=13.1199998855591px]Deny from allow
[size=13.1199998855591px]又试过改成
[size=13.1199998855591px] Order deny,allow
[size=13.1199998855591px] Allow from all
[size=13.1199998855591px]均无效,仍旧403。
[size=13.1199998855591px]
[size=13.1199998855591px]完全不懂,求打救。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)