Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a definitive guide for setting up Mamp Pro so local network users can view/edit sites?

I've been researching how to setup a LAN Mamp Pro server so local users can edit/view sites - but there seems to be a lot of confusion (at least I'm confused based on why I've read).

Specific questions:

Running Apache/Mysql as www/mysql: When I switch the users to www/mysql I see permissions issues and can't login to my CMS from the machine running Mamp Pro. What's the best way of fixing this or running Mamp Pro - taking into consideration permissions when using pushing to DEV and LIVE servers using Git and Github.

Ports: What is more secure, running Mamp Pro using ports 8888/8889 or the defaults of 80/3306? And is the only difference adding/not adding port numbers when viewing sites?

Access to sites by users on the same LAN: What are the steps for getting this working - the firewall on the MAMP Pro machine is currently off to test the basic setup but no one on our local network can connect to the sites - have tried 192.168.0.1:8888 & virtualhostname:8888

Sorry if this is easy but for a paid product, Mamp Pro help and support is pretty scarce and I suspect this stuff is easy if you know how to setup a linux server - but if you don't know how to do this, it's why you purchase MAMP Pro right?

Any help would be much appreciated.

Cheers

Ben

like image 862
CMSCSS Avatar asked Jun 18 '12 22:06

CMSCSS


People also ask

How can I access my MAMP server from another computer?

Type in the local ip of Mac with your MAMP PRO installed and running to access your localhost. This can be done from a mobile device or other Mac. Note: You need to include the port Apache is running on. If you run Apache on the default port 80, then you do not need to enter a port number.

How do I access localhost in MAMP?

To access your localhost on another Mac on your LAN, you need to type in it's Local Hostname. To find out the Local Hostname of this Mac, go to System Preferences > Sharing > Edit . Now you can access your hosts from a different Mac on your LAN. Input :8888 as a suffix in your url bar to see the localhost.

How do I open a website on MAMP?

To start the MAMP Apache and MySQL servers, simply click “Start Servers” from the main MAMP screen. Your MAMP servers have now been started. Once the MAMP servers start, the MAMP start page should open in your default web browser. If not, click on “Open start page” in the MAMP window.

Is MAMP a local server?

MAMP is a local server package which runs on a Mac, similar to packages for Windows and Linux, and is easy to set up and configure.


2 Answers

Here's what I did:

Setup:

  • I'm developing the site on my local computer

  • Mamp Pro is running on my local computer

  • I would like other people on the local network to login to the CMS on my computer and update the CMS

Server settings:

  • Use the default ports 80/3306 (just don't have web sharing turned on in OSX prefs) - I'm sure you could use the MAMP ports if you want

  • Run Apache/MySQL server as users www/mysql

Virtual host settings:

  • Give your server a name

  • Leave local name resolution on

  • Add the IP address of the computer Mamp Pro is running on e.g. 192.167.1.1

  • Add a port number (this will be the unique way of identifying sites on the LAN - see below for more) I just used port 8888

  • If you had a site setup prior to switching the Apache/MySQL users, click the "Permissions" button under the disk location and set owner to www and the group to admin so your local admin account has access - click "Set"

  • If the above step doesn't work properly, you'll now need to CMD + I the website directory and ensure your local machine admin has rights to read and write to the directory - be sure to click the cog and select "Apply to enclosed items" so the rights get applied to the directories inside

  • Start the virtual host

Accessing the site from another machine on the same LAN:

  • Enter the IP address of the Mamp Pro machine followed by the port number you entered

  • e.g. http://192.168.1.1:8888/

  • If you have multiple sites, just enter a different port number in the setup

This works for me and staff can now edit the CMS and view the site but it seems a bit 'hacky' to me using a different port for each site as the way to differentiate sites in development.

Please sing out if there's abetter way - this is just how I got it working.

like image 76
CMSCSS Avatar answered Oct 16 '22 13:10

CMSCSS


I have numerous sites set up with MAMP Pro.

To access a specific site, try shuffling it to the top of the list of sites in MAMP Pro, and then access using the IP address and port (as described above),

e.g. http://192.168.1.1:8888/

Geoff

like image 3
Geoff Avatar answered Oct 16 '22 14:10

Geoff