[英]MAMP installed and htdocs is set as localhost but can't see folder within localhost
I have set up MAMP on my windows 7 laptop and set the localhost to htdocs folder. 我已经在Windows 7笔记本电脑上设置了MAMP,并将localhost设置为htdocs文件夹。 I have created a database and renamed the wp-config_sample.php as wp-config after I named the DB, username, and password within this file.
我创建了一个数据库,并在该文件中命名了数据库,用户名和密码后,将wp-config_sample.php重命名为wp-config。
The appache server and MYSQL servers are turned on. appache服务器和MYSQL服务器已打开。 In the Chrome browser if I type in localhost/ the following is displayed:
在Chrome浏览器中,如果我输入localhost /,则会显示以下内容:
index of/
test.php
but a wordpress folder within htdocs called testsite is not visible In the browser if I type in the localhost/MAMP/ the MAMP page is displayed correctly. 但是htdocs中名为testsite的wordpress文件夹不可见,如果我键入localhost / MAMP /,则在浏览器中将正确显示MAMP页面。 If I type in localhost:3306/testsite the following is displayed:
如果我键入localhost:3306 / testsite,则会显示以下内容:
This page isn’t working
localhost sent an invalid response.
ERR_INVALID_HTTP_RESPONSE
The MySQL port has been changed to 3306 which is free MySQL端口已更改为3306,这是免费的
If I type in localhost/testsite the following is displayed: 如果我输入localhost / testsite,将显示以下内容:
Forbidden
You don't have permission to access /testsite/ on this server.
Please let me know what other information I need to put in this post. 请让我知道我需要在帖子中添加哪些其他信息。 Thanks
谢谢
You need to set the folder permission to view the folder in localhost 您需要设置文件夹权限才能在本地主机中查看文件夹
Run command chmod *** /folder
to change the permission 运行命令
chmod *** /folder
更改权限
@updated: @更新:
Then you should try adding such lines in host file.conf in Mamp 然后,您应该尝试在Mamp的host file.conf中添加这样的行
Alias /mytest/ "C:/mytest/"
<Directory "C:/mytest/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
Allow from all
Require local
</Directory>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.