是否有设置Mamp Pro的权威指南,以便本地网络用户可以查看/编辑站点? [英] Is there a definitive guide for setting up Mamp Pro so local network users can view/edit sites?
问题描述
我一直在研究如何设置LAN Mamp Pro服务器,以便本地用户可以编辑/查看站点-但似乎有很多困惑(至少基于阅读原因,我感到困惑).
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).
具体问题:
以www/mysql身份运行Apache/Mysql::将用户切换到www/mysql时,我看到权限问题,无法从运行Mamp Pro的计算机登录到CMS.修复此问题或运行Mamp Pro的最佳方法是什么-在使用Git和Github推送到DEV和LIVE服务器时要考虑权限.
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.
端口:使用端口8888/8889或默认端口80/3306运行Mamp Pro会更安全吗?在查看网站时添加/不添加端口号是唯一的区别吗?
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?
同一LAN上的用户访问站点:要使此工作正常,需要执行什么步骤-MAMP Pro计算机上的防火墙目前已关闭,无法测试基本设置,但我们本地没有防火墙网络可以连接到站点-已尝试 192.168.0.1:8888 & 虚拟主机名:8888
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
很抱歉,如果这很容易,但是对于付费产品而言,Mamp Pro的帮助和支持却很匮乏,如果您知道如何设置linux服务器,我怀疑这东西很容易-但如果您不知道如何做到这一点,这就是为什么您正确购买MAMP Pro的原因?
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?
任何帮助将不胜感激.
欢呼
本
推荐答案
这就是我所做的:
设置:
-
我正在本地计算机上开发网站
I'm developing the site on my local computer
Mamp Pro在我的本地计算机上运行
Mamp Pro is running on my local computer
我希望本地网络上的其他人登录到计算机上的CMS并更新CMS
I would like other people on the local network to login to the CMS on my computer and update the CMS
服务器设置:
-
使用默认端口
80/3306
(只是在OSX首选项中没有打开Web共享)-我确定您可以使用MAMP端口
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
以用户www/mysql
虚拟主机设置:
-
为您的服务器命名
Give your server a name
将本地名称解析保留在
添加运行Mamp Pro的计算机的IP地址,例如192.167.1.1
Add the IP address of the computer Mamp Pro is running on e.g. 192.167.1.1
添加端口号(这是识别LAN上站点的唯一方法-参见下文,更多信息)我只是使用端口8888
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
如果在切换Apache/MySQL用户之前进行了站点设置,请单击磁盘位置下的权限"按钮,并将所有者设置为www,将组设置为admin,以便您的本地管理员帐户具有访问权限-单击设置"
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"
如果上述步骤无法正常进行,则现在需要CMD + I网站目录,并确保本地计算机管理员有权读写该目录-请确保单击齿轮并选择应用于封闭的项目",以便将权限应用于内部目录
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
启动虚拟主机
从同一LAN上的另一台计算机访问该站点:
-
输入Mamp Pro机器的IP地址,然后输入您输入的端口号
Enter the IP address of the Mamp Pro machine followed by the port number you entered
例如http://192.168.1.1:8888/
如果您有多个站点,只需在设置中输入其他端口号
If you have multiple sites, just enter a different port number in the setup
这对我有用,并且工作人员现在可以编辑CMS并查看网站,但是对于我来说,为每个网站使用不同的端口作为区分正在开发的网站的方式似乎有点麻烦".
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.
这篇关于是否有设置Mamp Pro的权威指南,以便本地网络用户可以查看/编辑站点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!