免费MAMP上的主页Wordpress不起作用 [英] Home Page Wordpress on Free MAMP does not work
问题描述
我已经在Mac上安装了MAMP(免费版),并且看到了起始页",但是我遇到了问题:
I have installed MAMP (free version) on my Mac and I see the Start Page but I have a problem:
我部署了wordpress,但是浏览器说无法连接(基本上我看不到浏览器中的wordpress页面).
I deployed wordpress but browser say unable to connect (basically I cannot see wordpress page in browser).
在文档根目录"中,如果我放置了静态html文件,则可以在浏览器中看到它.我还可以看到wordpress管理页面和除主页以外的所有其他页面.我有8888和8889用于php和mysql端口.我不知道如何调试问题.php,apache和mysql没有报告任何特定问题.
In Document Root if I put a static html file I am able to see it in the browser. I am also able to see wordpress administrative pages and all other pages but home page. I have 8888 and 8889 for php and mysql ports. I do not know how to debug the issues. php, apache and mysql do not report any particular problems.
我按照此指南配置了虚拟主机: http://foundationphp.com/tutorials/vhosts_mamp.php
I configured virtual hosts following this guide: http://foundationphp.com/tutorials/vhosts_mamp.php
当我在浏览器中放置 http://localhost:8888/mywebsite 时,这很奇怪到localhost/mywebsite.
The strange thing when I put http://localhost:8888/mywebsite in the browser it is redirected to localhost/mywebsite.
在/etc/hosts中,我有:
In /etc/hosts I have:
127.0.0.1 localhost
在httpd.conf中,我激活了:
In httpd.conf I activated:
Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
在这个文件中,我有:
NameVirtualHost *:8888
<VirtualHost *:8888>
ServerAdmin myuser@gmail.com
DocumentRoot "/Applications/MAMP/htdocs"
ServerName localhost
ErrorLog "logs/mywebsite-error_log"
CustomLog "logs/mywebsite-access_log" common
</VirtualHost>
希望有人可以提供帮助.
Hope someone could help.
推荐答案
我找到了解决方案.经过几次调试后,我发现该指南是正确的: http://foundationphp.com/tutorials/vhosts_mamp.php
I found the solution. After several debugging I found that this guide is correct: http://foundationphp.com/tutorials/vhosts_mamp.php
您需要:1.在/etc/hosts中,添加虚拟主机,例如:
You need: 1. In /etc/hosts add your virtual hosts like:
127.0.0.1 localhost
127.0.0.1 mywebsite
在我仅使用localhost之前,是因为我希望在浏览器中使用此主机,但是我发现需要定义一个新主机(如mywebsite).
before I only used localhost because I hoped to use this host in browser but I found it's required to define a new host like mywebsite.
-
在httpd.conf中,我激活了:
In httpd.conf I activated:
包含/Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
在此文件中,我有:
ServerAdmin myuser@gmail.comDocumentRoot"/Applications/MAMP/htdocs"ServerName mywebsiteErrorLog日志/mywebsite-error_log"CustomLog日志/mywebsite-access_log"常见
ServerAdmin myuser@gmail.com DocumentRoot "/Applications/MAMP/htdocs" ServerName mywebsite ErrorLog "logs/mywebsite-error_log" CustomLog "logs/mywebsite-access_log" common
这篇关于免费MAMP上的主页Wordpress不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!