1

I have installed MAMP on my MacBook, and I use localhost to manage my website repositories. Previously once I installed OS X Server I was not able to manage my websites because there was OS X Server. Is it possible to configure OS X Server under the different name than localhost (example: osxhost)?

1
  • Looks like an xy-problem. Please mess around with MAMP but not with your system (which IS localhost). Use virtual hosts in MAMP, different ports for your repositories or the integrated dns server of OS X Server.
    – klanomath
    Dec 29, 2015 at 13:51

2 Answers 2

3

I think that the issue may be that both MAMP and OS X Apache (VIA the Server.app) are both listening on the default port 80. If you use SCUTIL to set the host name it will change the hostname for all servers on that Mac, I believe.

What I would do is check the settings in MAMP and make sure it is not listening on port 80 and if it is change it to something else. I believe if you restore defaults it will listen on a different port. Then you will have two independent web servers each listening on a different port. The server.app web server will listen on port 80 and MAMP on whatever port it is set to.

Now you can get to the MAMP site by adding a colon and the port number after localhost. Assuming MAMP is set to port 8080 it would look like this:

http://localhost:8080

and for the server.app server instance:

http://localhost

If you don't specify a port, it defaults to port 80.

-1

maybe this command can help you: scutil –setHostName <new hostname>

source: krypted

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .