Mamp Server For Mac

Posted on

In order to comfortably edit several dynamic websites in Dreamweaver at the same time you do not need several teting servers. Instead, you can set up virtual hosts on your existing Apache installation. This will work with any popular distribution including MAMP, WAMP and XAMP. Today we will show you how to set up virtual hosts on MAMP.

1. Install MAMP

First, go to the official MAMP website and download your free copy of MAMP. Unzip the packgage, double-click the installer and follow the on-screen instructions.

MAMP (free) By default MAMP free starts the MySQL server without a my.cnf file, i.e. It uses the default configuration which comes with the MySQL build. So you have to create a config file manually: Quit MAMP (stop the servers) Run following command in the terminal. MAMP is so touchy. Here's what worked for me: cd /Applications/MAMP. Move or rename: mv tmp tmpOLD. Recreate the folder and a subfolder: mkdir tmp; mkdir tmp/mysql. Now start mysql from MAMP. I think it's possible the socket lock file (tmp/mysql/mysql.sock.lock) gets corrupted. The major PHP version on your remote server must be at least the same major version of your MAMP PRO host, e.g.: local host PHP version 7.0.27 will work with remote server PHP version 7.0.13 will have compatible version in order to start transferring. MAMP is a free, local server environment that can be installed under macOS and Windows with just a few clicks. MAMP provides them with all the tools they need to run WordPress on their desktop PC for testing or development purposes, for example. With the help of our local DNS server NAMO, you can even easily test your projects on mobile devices.It does not matter whether you prefer the. The MAMP is a free, open source utility that enables Mac OS X users to install Apache server, MySQL, PHP, eAccelerator and PHPMyAdmin with ease.

At this point, you should have a working installation of Apache with MySQL.
In order to manage your servers, locate a folder named MAMP in your Applications folder and double-click MAMP.app.

In order to complete the other steps you should stop your servers now.

2. Edit /etc/hosts on your Mac

Open the Terminal and type

sudo pico /etc/hosts

When prompted, enter the password of your administrator account.

Edit the file in a way that you see a result like this:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost localhost2 localhost3
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost

Instead of localhost, localhost2, localhost3 you could actually put in the name of a project.

When you are done editing the /etc/hosts file, press Control-O in order to output your changes to the file. When prompted to overwrite existing file, confirm with Return. The editor will overwrite the existing /etc/hosts file. Press Control-X to exit pico.

3. Edit the the httpd.conf file

Mac

Open the file httpd.conf located in /Applications/MAMP/conf/apache in a text editor of your choice (either TextEdit in plain text mode, TextWrangler or BBEdit will do).

Open the file httpd.conf located in /Applications/MAMP/conf/apache in a text editor of your choice (either TextEdit or BBEdit will do).

Navigate to the end of that file and enter this:

#NameVirtualHost *:8888
Include /Applications/MAMP/conf/apache/vhosts.conf

This will ensure that Apache reads the contents of the vhosts.conf file you are going to create.

3. Create your vhosts.conf file

Create a new text file and save it in the Include path you defined in the previous step. Enter in it this code:

# Virtual Hosts
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any block.
#
# ServerAdmin [email protected]
# DocumentRoot '/www/docs/dummy-host.example.com'
# ServerName dummy-host.example.com
# ServerAlias www.dummy-host.example.com
# ErrorLog '/private/var/log/apache2/dummy-host.example.com-error_log'
# CustomLog '/private/var/log/apache2/dummy-host.example.com-access_log common'
#
# ServerAdmin [email protected]
# DocumentRoot '/www/docs/dummy-host2.example.com'
# ServerName dummy-host2.example.com
# ErrorLog '/private/var/log/apache2/dummy-host2.example.com-error_log'
# CustomLog '/private/var/log/apache2/dummy-host2.example.com-access_log common'

ServerName localhost
DocumentRoot /Applications/MAMP/htdocs/

Server

Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all

ServerName localhost2
DocumentRoot /Applications/MAMP/htdocs2/

Mamp Server For Mac Os

Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all

ServerName localhost3
DocumentRoot /Applications/MAMP/htdocs3/

Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all

Save the file.

4. Create directories for virtual hosts

In Finder, navigate to /Applications/MAMP/. Create directories which will serve as documents folders for your virtual hosts:

htdocs2
htdocs3

5. Restart and verify

Restart MAMP services.
In order to verify that all is well, point your web browser to:
http://localhost2:8888/

If you see anything at all which isn’t an error message of your browser, for example if you see this information:

Index of /
Apache/2.0.64 (Unix) PHP/5.3.5 DAV/2 Server at localhost2 Port 8888

you are done!
Now you can begin setting up Dreamweaver in order to use your new virtual hosts as testing servers for dynamic web pages.

We didn’t mension that MAC word on title like, ‘Installation of MAMP Server on MAC’. Because we know about MAMP. MAMP contains two version, free MAMP version and MAMP pro version. Here we are going to see install free MAMP version. MAMP pro version is a paid version which cost near $60, will see this one later. Let’s Go,

Mamp Window

First we need to download the MAMP installation package from MAMP official website.

After the download completes open the downloaded file and start installation of MAMP server.


After that we will see MAMP version or MAMP pro version. We are going to install MAMP free version, so just select MAMP.

Now we need to make some basic configuration setup that includes PHP, Server Port, Apache. So click the “preference” button, before start Servers.

After that click the “start/stop” button. Enable Start Server when starting MAMP and Stop Server when quitting MAMP.

You can disable Check for MAMP PRO when starting MAMP and Open start page at startup.

Click “Ports” button. Here we are going to set port numbers. For example set Apache port to 8888, MySQL port to 8889. If we set apache port to 80, we need to enter admin password every time.

Mamp & Mamp Pro

After that click “PHP” and choose the latest version of PHP for higher security and stable performance.

Then click “Apache” button, click document root button and select the root folder as your wish.

Now installation of MAMP server is finished successfully.

The following two tabs change content below.Mac

Mamp Server

I am Karthik, software engineer by profession. I'm giving some steps to installing, re-installing, updating, removing and any other related queries about software’s, operating systems, plug-ins and so on.You can find and follow me, from Social Media or here.Google+

Mamp Server For Mac

  • Step to Install JOOMLA in WAMP Localhost - March 30, 2020
  • ‘Your Projects’ Links Not working in WAMP Server - March 29, 2020