本文介绍了窗口7中的xampp无法访问C:/xampp/htdocs中子文件夹中的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

httpd.conf中,我已将端口更改为:Listen 8080ServerName localhost:8080

In httpd.conf I've changed port to : Listen 8080 and ServerName localhost:8080

现在,在浏览器中,我必须输入http://localhost:8080,并且一切正常,并且可以在htdocs目录中看到我的所有文件和文件夹.

Now on my browser I had to enter http://localhost:8080 and everything seems to work fine and I can see all my files and folders inside htdocs directory.

问题是我无法进入htdocs下的任何文件夹,例如:C:\xampp\htdocs\wordpress

The problem is that I cannot go inside any folders under htdocs for example: C:\xampp\htdocs\wordpress

当我在浏览器中单击wordpress/时,它会显示

When I click on wordpress/ in the browser it says

奇怪的是,如果我键入http://localhost:8080/wordpress,URL会自动更改为http://localhost/wordpress/.
而且我得到同样的错误:"Webpage is not available"

And something weird is if I type http://localhost:8080/wordpress the URL would automatically change to http://localhost/wordpress/.
And I get same error : "Webpage is not available"

这是因为我将端口更改为8080吗?
我是否缺少其他配置?

Is this because I change the port to 8080 ?
Am I missing some other config ?

推荐答案

首先,只要您在conf文件中进行任何更改,都尝试重新启动apache

First of all try to restart apache whenever you make any change in conf file

您似乎没有使用新鲜的wordpress.浏览器的网址由于某些htaccess规则而删除了8080.

you seems to be not using fresh wordpress. And browser url removing the 8080 because of some htaccess rule.

您可以通过在htdocs中创建一个名称测试文件夹来测试apache.并用此代码放入一个简单的php文件

you can test apache by making a folder with name test in htdocs. And put a simple php file with this code

<?php 
    phpinfo();

并将其另存为testapache.php

and save it as testapache.php

并通过

http://localhost:8080/test/testapache.php

这篇关于窗口7中的xampp无法访问C:/xampp/htdocs中子文件夹中的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 14:28