Wednesday, October 7, 2009
Running a Local Server with MAMP
Posted on 10:21 AM by -
If you’re a website designer, developer or blogger, the ability to test websites locally can be remarkably useful. It could serve as a testing environment before uploading a new page to your website, or provide a way to work on a website project without an internet connection.
Although OS X comes bundled with a basic web server installed, a more user-friendly solution is available in the form of MAMP. Today we’ll be walking you through the process of setting up a local server with MAMP and outlining the difference between the basic and pro versions.
What is MAMP?
MAMP stands for Mac, Apache, MySQL and PHP. Each of these are the basic elements needed for a functional web server, and MAMP puts them together into an easy-to-use package.OS X already comes with a basic Apache web server installed, and you’ll be pleased to know that MAMP leaves it completely untouched. No system files are interfered with, and it’s equally easy to uninstall if you find yourself with no use for it.
If you’re planning on creating a site purely with HTML and CSS, there’s no need for a local “web server” as such – just open the file you’ve created in Safari or Firefox. The need for MAMP arises when you need to create a dynamic site with server-side scripting (such as PHP), and a database (in this case, MySQL).
Installation & Setup
After downloading and installing MAMP, you’ll be presented with this simple user interface. Green means that everything is running fine; red means that the server is stopped:The MAMP Interface
Welcome Page
MAMP is also a great solution for running web applications locally. I use it for hosting a copy of Fever, a web based RSS reader, resulting in a far more responsive interface than if accessed over the web.
Preferences
MAMP is fairly light on the preferences front but a few exist which are certainly worth mentioning. Firstly, you can select whether opening or quitting MAMP will start/stop the server behind it. Deselecting these two options can be useful if you’d like the server to run in the background with any MAMP user interface.Start & Stop Settings
Alter Document Root
Managing a MySQL Database
Another option to mention (we are a Mac application blog after all) is to use an app such as Querious or Sequel Pro. Both are perfectly capable of interacting with your local MAMP installation, though you’ll need to use the connection settings displayed on the “Start page” to get everything working correctly.
Should you go Pro?
Two different versions of the servers software are available: MAMP, and MAMP PRO. The professional version has a number of additional features which you may find useful (particularly if testing more than one website):
- Virtual Hosts – For managing several sites locally, each with their own web address and folder structure
- Local Mail Server – For sending messages via PHP
- Dynamic DNS – To allow easy external access to your MAMP installation (outside a local network)
- Easier configuration of Apache modules
MAMP Pro Interface
Conclusion
If the default Apache installation on OS X isn’t powerful enough for you (and the thought of editing server configuration files makes you shudder), MAMP is a fantastic option. Installation is incredibly simple and you can have a fairly advanced server running in no time at all.The free release is advanced enough for most casual users, though if you’re looking to test several different domains/websites I would strongly recommend paying $50 for the PRO version.
Do you have any experience with MAMP? I would be interested to know which version you run, and which websites you test locally!
Subscribe to:
Post Comments (Atom)
No Response to "Running a Local Server with MAMP"
Leave A Reply