0
votes

I have installed MAMP (free version) on my Mac and I see the Start Page but I have a problem:

I deployed wordpress but browser say unable to connect (basically I cannot see wordpress page in browser).

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.

I configured virtual hosts following this guide: http://foundationphp.com/tutorials/vhosts_mamp.php

The strange thing when I put http://localhost:8888/mywebsite in the browser it is redirected to localhost/mywebsite.

In /etc/hosts I have:

127.0.0.1 localhost

In httpd.conf I activated:

Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf

and in this file I have:

NameVirtualHost *:8888

<VirtualHost *:8888>
    ServerAdmin [email protected]
    DocumentRoot "/Applications/MAMP/htdocs"
    ServerName localhost
    ErrorLog "logs/mywebsite-error_log"
    CustomLog "logs/mywebsite-access_log" common
</VirtualHost>

Hope someone could help.

1
An update. I am able to see administration localhost:8888/mywebsite/wp-admin but not the actual website: localhost:8888/mywebsite - Salvatore D'angelo
Second Update. I realized all website pages are visible but home page. I do not why. - Salvatore D'angelo

1 Answers

0
votes

I found the solution. After several debugging I found that this guide is correct: http://foundationphp.com/tutorials/vhosts_mamp.php

You need: 1. In /etc/hosts add your virtual hosts like:

127.0.0.1 localhost
127.0.0.1 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.

  1. In httpd.conf I activated:

    Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf

  2. In this file I have:

    ServerAdmin [email protected] DocumentRoot "/Applications/MAMP/htdocs" ServerName mywebsite ErrorLog "logs/mywebsite-error_log" CustomLog "logs/mywebsite-access_log" common