MacOS – Hostname changed after setting up virtual host in MAMP

macosmamp

I have MAMP Pro installed and recently configured a local virtual host called: test.local.

Now my OSX terminal prompt says

test:~ username$

I just noticed also when an email bounced back the raw header also shows test.local:

Received: from cpe-111-111-111-111.lns1.lon.somehost.com ([222.222.222.2222]:22222 helo=testhost.local)

I've tried running…

scutil --set LocalHostName properHostName

…but it hasn't had an effect. Also, if I do override it to the original proper hostname, will there be negative side effects?

Best Answer

Doing this fixed it:

sudo hostname properhostname.local

And I haven't noticed any side-effects yet. I can still access the virtual host using testhost.local. Works after a MAMP restart also.