MAMP5.0.4 - newly created local domain pointing to localhost - can't work out why.

All MAMP discussions around troubleshooting and anything related to MAMP. Be as detailed as possible here when posting an issue.
Post Reply
jwood8mc
Posts: 1
Joined: Wed Aug 03, 2022 8:27 am

MAMP5.0.4 - newly created local domain pointing to localhost - can't work out why.

Post by jwood8mc »

Hi,

First time poster, hope you can help, many thanks in advance for anything I learn here.

**Desired behaviour :**

For the local site (http://new-site.local) I have set up, to open in the location I have specified in MAMP (c:/MAMP/htdocs/newSite/public_html), not as if it were localhost (c:/MAMP/htdocs)

**Explanation :**

I have 6 sites set up locally with MAMP. But I have tried to add a new site today, and when try to browse to "http://new-site.local", the site opens the location of "http://localhost".

**What I have done :**

I have set the document root to the correct place in MAMP, but when MAMP was "working with the servers", nothing appeared to happen for over an hour, so I closed the window.

I have then followed the steps laid out at


Those steps were :

* making sure that

```
Include conf/extra/httpd-vhosts.conf
```

is not commented in C:\MAMP\conf\apache\httpd.conf

* allowing the symlink override to work in C:\MAMP\conf\apache\httpd.conf

```

<Directory />
Options FollowSymLinks ExecCGI
AllowOverride all
Order deny,allow
Allow from all
</Directory>

```

* Added a virtual host path in C:\MAMP\bin\apache\conf\extra\httpd-vhosts.conf

```
<VirtualHost *:80>
ServerName new-site.local
DocumentRoot "C:/MAMP/htdocs/newSite"
</VirtualHost>
```
* Modified the C:\WINDOWS\system32\drivers\etc\hosts file, adding the new local site domain name to the localhost IP address
```
127.0.0.1 new-site.local
```

* restarted the servers.

But still http://new-site.local opens up as if it was http://localhost.
Post Reply