A few weeks ago, The Rocket Yard ran an article detailing the many services that will be removed from macOS Server in the near future. Today, I’ll discuss how to bring back one of those services — web hosting — using both the Apache web server that is built into macOS and the full MAMP suite.
Apache Web Server
Most Mac users don’t realize it, but macOS comes with its own built-in web server. Apache is an open-source web server that has been available since 1995, and as of 2016, it was the engine behind 46% of all websites and 43% of the top million websites in terms of traffic.
Most Mac users don’t realize it, but macOS comes with its own built-in web server. Apache is an open-source web server that has been available since 1995, and as of 2016, it was the engine behind 46% of all websites and 43% of the top million websites in terms of traffic.
Having a web server built into macOS is perfect for those who want to share information in a small workgroup or set up and test sites on a development web server before deploying them to an internet server. These instructions show you how to set up Apache server in macOS High Sierra. You’ll need to have some knowledge of the Terminal app and how to run command line programs, an understanding of web servers, and a familiarity with the vi editor.
To begin, we edit the Apache configuration file as root:
sudo vi /etc/apache2/httpd.conf
MAMP is a very easy to install compilation of Apache, PHP and MySQL for Mac OS X. Everything will be installed in one folder. If you want to get rid of it, just move the folder into trash. An easy to use cocoa program to start and stop the servers. Anything better then MAMP for OSX? Over 5 years ago from Maksim Petriv. I mainly do Rails & Node these days so don't want to dirty up my Mac with MAMP - Vagrant works great for the occasional bit of PHP. Designer News is a large, global community of people working or interested in design and technology. Download MAMP from www.mamp.info. Double click on the file MAMPMAMPPRO5.0.pkg in your Downloads folder. The System Installer will guide you through the installation process. The installer will rename its MAMP folder to MAMPcurrentdate. See how to install WordPress on Mac with MAMP? Please refer to below steps to set up local MySQL server on Mac with MAMP. Create a Database on Mac with MAMP. To create a local MySQL database on Mac, you can make use of the phpMyAdmin tool which comes with MAMP by default.
A web server is relatively useless without a server-side scripting language with which to handle interactions; the most popular languages are PHP, Perl, and Python. In this example, we’ll enable PHP and Perl. To do so, you’ll need to uncomment line 176 of the configuration file. In the vi editor, you can do this easily by typing 176G to go directly to line 176. Next, type an x over the # at the beginning of the following line to delete the # comment marker:
Mamp Pro Download Mac Os X
#LoadModule php7_module libexec/apache2/libphp7.so
Mac OS X users can download the MAMP, and with just a few clicks, install the software bundle in a folder, making it easier than ever (in typical Mac fashion) for users to host applications on.
We want to do the same to be able to run Perl scripts, which is in line 177 of the configuration file. Use your arrow key to go down to the beginning of the next line, then type the x over the # to delete the comment marker. The configuration file should then looks something like this around line 176 (see screenshot below):
Editing the Apache configuration file in the vi editorTo save your changes in the editor, type :w!
We still need to enable personal websites by uncommenting line 173, so type 173G and press return, then type an x over the # to delete it. The same must be done with line 513 of the file — type 513G and press return, then type an x over the # to delete it. Now we’ll save these two final changes and quit the editor by typing ZZ.
The last command just enabled a file named http-userdir.conf, and we now need to edit it: In Terminal, enter:
sudo vi /etc/apache2/extra/httpd-userdir.conf
In this configuration file, we need to uncomment line 16. Type 16G and press return, then type an x over the # to delete it. Save and exit by typing 16G.
Up until Mac OS X Lion, it was possible to share websites with a local workgroup and create personal websites with a click; to publish web pages, you simply put your html files into a Sites folder. Now we have to do a lot more work. Let’s manually create a Sites folder in Terminal and make a small test file so we know our web server is working.
Enter the following commands:
mkdir ~/Sites
echo “<html><body><h1>Welcome to my site</h1></body></html>” > ~/Sites/index.html.en
Next, we need to make sure that we have a user configuration file. To create one, type in
sudo vi /etc/apache2/users/<your short user name>.conf
Where <your short user name> is your Unix short user name. Don’t know what that name is? Look at the top of the Terminal window and you’ll see a name listed — that’s the short user name. In my case, it’s stevensande, so I’d enter
sudo vi/etc/apache2/users/stevensande.conf (don’t use this for YOUR configuration file!)
In that configuration file we want to enter the following (cutting and pasting into vi works):
<Directory “/Users/<your short user name>/Sites/”>
AddLanguage en .en
AddHandler perl-script .pl
PerlHandler ModPerl::Registry
Options Indexes MultiViews FollowSymLinks ExecCGI
AllowOverride None
Require host localhost
</Directory>
AddLanguage en .en
AddHandler perl-script .pl
PerlHandler ModPerl::Registry
Options Indexes MultiViews FollowSymLinks ExecCGI
AllowOverride None
Require host localhost
</Directory>
Once again, remember to replace <your short user name> with your short user name. Type ZZ to save the new configuration file and quit the editor.
If you’ve made it this far… congratulations! Now let’s check our configuration of Apache by running the following command in Terminal:
apachectl configtest
You’ll probably get a warning message that says “http: Could not reliably determine the server’s full qualified domain name” along with how to resolve that issue; since this is just for a local web server, ignore that warning — what you do want to see is the last line: Syntax OK.
If everything is fine up to this point, you’re ready to start up Apache. If any of the configuration file syntax is incorrect, you’ll receive warnings on what needs to be fixed.
At long last, we’re ready to launch the Apache httpd service:
sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist
To see our one line web page, launch Safari or your favorite browser and enter http://localhost/
You should see:
It works!
To see your user home directory, enter http://localhost/~<your short user name>, once again replacing <your short user name> with your Unix short user name. It should say:
To see your user home directory, enter http://localhost/~<your short user name>, once again replacing <your short user name> with your Unix short user name. It should say:
Welcome to my site
Should you decide to shut down the Apache service, there’s a simple one-line Terminal command to do so:
Should you decide to shut down the Apache service, there’s a simple one-line Terminal command to do so:
sudo /usr/sbin/apachectl stop
Making life easier with MAMP
That was a lot of work to get things up and running, wasn’t it? There’s a much easier way to set up a local test server! For quite a while, developers have realized that packaging Apache, MySQL (a database server), and PHP/Python/Perl was the best way to get a very powerful web server. Add “Mac” to the beginning of this, and you have MAMP — Mac, Apache, MySQL, and PHP/Python/Perl. The “AMP” distributions (LAMP for Linux, WAMP for Windows, MAMP for Mac) are the backbone of the wildly popular WordPress platform, so if you want a very complete WordPress development environment on your Mac, you’ve come to the right place.
That was a lot of work to get things up and running, wasn’t it? There’s a much easier way to set up a local test server! For quite a while, developers have realized that packaging Apache, MySQL (a database server), and PHP/Python/Perl was the best way to get a very powerful web server. Add “Mac” to the beginning of this, and you have MAMP — Mac, Apache, MySQL, and PHP/Python/Perl. The “AMP” distributions (LAMP for Linux, WAMP for Windows, MAMP for Mac) are the backbone of the wildly popular WordPress platform, so if you want a very complete WordPress development environment on your Mac, you’ve come to the right place.
MAMP comes in two varieties; the free MAMP solution for a personal web server and MAMP Pro ($59), which adds additional services like email, dynamic DNS, and more. For this post, we’ll install and configure the free MAMP.
1)Download MAMP from the MAMP website
2) Open the .pkg file and follow the installation instructions to install MAMP to your Mac
3) Once the installation is complete, you’ll find two folders in your Applications folder — one for MAMP, and another that is a 14-day free trial for MAMP Pro. Open the folder named MAMP and launch the MAMP app. You’ll see something that looks like this screenshot:
The MAMP startup interface![Download Download](/uploads/1/3/3/2/133296028/767905811.jpg)
4) Click the “Start Servers” button.
MAMP will start both the Apache and MySQL servers, then launches a webpage that confirms that your MAMP installation is complete (see screenshot below):
(The MAMP welcome page, indicating that all services are running.)Download Mamp Per Mac
The “My Website” link shows an empty page, but you can change that by placing an index.html file into the htdocs folder found in the MAMP folder. It’s easy to change the Document Root directory by going to MAMP > Preferences > Web Server.
Note that MAMP Pro also brings “Extras” to the table; these are packages designed by the MAMP team to install quickly and bring added functionality. Remember my comments about WordPress? There is not only a MAMP Extra for WordPress, but for Joomla, Drupal and other content management systems as well.
Be Sociable, Share This!
OWC is on-site wind turbine powered at 8 Galaxy Way, Woodstock, IL 60098 | 1-800-275-4576 | +1-815-338-8685 (International)
All Rights Reserved, Copyright 2018, OWC – Since 1988
MAMP Download for Mac stands for their: Mac computer, Apache, MySQL as well as their PHP. With a few mouse-clicks, anyone will be able to set up Apache, PHP and their MySQL regarding their Mac-Os X!
MAMP installs the local server environment at the matter of seconds on your Mac Os X pc, be it PowerBook or iMac. Just like same packages through the Windows- as well as their Linux-world, MAMP Full version download will come at no cost.
MAMP Full Version Download for Mac has been installed within the typical Mac fashion: effortlessly. MAMP is not compromise any kind of existing Apache set up already operating with your Mac Os X. Anyone should be in a position to set up Apache, PHP and their MySQL without starting the script or obtaining to switch any configuration files!
Furthermore, if MAMP have been no longer needed, the software application can also be sufficient so that you can delete the MAMP folder and all returns because of its original status (i.e. MAMP will not modify any kind of with their “normal” Mac Os X).
Similar to a Linux-Distribution, MAMP is actually a combination of application and their thus it can also be offered free of charge. MAMP can also be launched within the GNU General Public License and will thereby be distributed freely in just the limits with this license. Please note: a few with their included software is launched using a the different license. Within these cases, the corresponding license is applicable.
Mac Os MAMP Download was developed primarily being a PHP enhancement environment download for mac personal computer and have to and therefore not be used as Live Webserver for that Web. In this case, we recommend that you use Mac Os X server with all the provided Apache or a Linux systems server.
What’s New in Mac Os MAMP Download 3.4
Version 3.4:
- Updated modules: PHP 5.4.42, 5.5.26 & 5.6.10, phpMyAdmin 4.4.9
- Fixed the bug that this caused MAMP PRO in order to crash when user was logged in by using directory services
- Disabled table_cache setting from MySQL config file my.cnf
- Replaced key_buffer setting with key_buffer_size setting in my.cnf
Compatibility
Mac-Os X 10.6.6 or later
More from my site
- MAMP 3.3 Free Download MAMP Download for Mac Os stands for their: Apple pc, Apache, MySQL and PHP. With just a few mouse-clicks, anyone must be able to set up Apache, PHP in addition to their MySQL regarding […]
- Zend Studio 12.5.1 Free Download Zend Studio can be the only Integrated Development Environment (IDE) designed for specialized developers that the encompasses all of the development components necessarily to its whole […]
- SQLPro Studio 1.0.29 Free Download SQLPro Studio Download for Mac may be the premium database control application tool regarding their Postgres, MySQL, The microsoft company Control Studio and their Oracle databases. […]
- Komodo IDE 10.0.0 Free Download Cross-Platform IDE for everybody up your major languages, which include Python, PHP, Ruby, Perl, Tcl, NodeJS, HTML, CSS as well as their JavaScript. Award-winning tools regarding their […]
- SQLPro Studio 1.0.80 Free Download Free SQLPro Studio Download for Mac OsX is also the premium database control software tool for Postgres, MySQL, Microsoft company Management Studio as well as their Oracle databases. […]
- Dumper 1.2.1 Free Download Class dumping has never been more handy! Dumper for Mac Os allows you to extract, browse and their inspect the class declarations from any kind of Mach-O file that contains Objective-C […]