问题
In httpd.conf
I've changed port to : Listen 8080
and ServerName localhost:8080
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.
The problem is that I cannot go inside any folders under htdocs
for example: C:\xampp\htdocs\wordpress
When I click on wordpress/
in the browser it says
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
"
Is this because I change the port to 8080 ?
Am I missing some other config ?
回答1:
First of all try to restart apache whenever you make any change in conf file
you seems to be not using fresh wordpress. And browser url removing the 8080 because of some htaccess rule.
you can test apache by making a folder with name test in htdocs. And put a simple php file with this code
<?php
phpinfo();
and save it as testapache.php
and browse it by
http://localhost:8080/test/testapache.php
来源:https://stackoverflow.com/questions/26398199/xampp-in-window-7-cannot-access-files-in-subfolder-inside-c-xampp-htdocs