Clicking on Anyone and then Customize… brings up the “Restrict access to the following folders to a chosen group” screen, where you can choose web directories and then define groups of users who can access the contents. Who Can Access: By default Anyone (all users, including unauthenticated guests) can access the contents of sites.Click on the drop-down menu and then select Other to browse to the directory files are stored in. These can be placed into the correct directory using file shares or copying using the Finder. Store Site Files In: The directory that the files that comprise the website are stored in.SSL Certificate: Loads a list of SSL certificates installed using Keychain or the SSL Certificate option in the Settings pane of the Server application.The default sites do not have this option as they are configured to use 80 and 443 for default and SSL-based communications respectively. Use the Port field to use custom ports (e.g., 8080). Port: By default, sites without SSL run on port 80 on all network interfaces, and sites with SSL run on port 443 on all network interfaces.The default websites do not have this option as they are accessible from all addresses automatically Any means the site is available from every IP address the server is configured to use. IP Address: The IP address the site listens on.The default sites do not have this option as they are accessible from all names that resolve to the server. Domain Name: The name the site is accessible from.The most important is the name of the site, with other options including the following:
At the New Web Site pane, you’ll be prompted for a number of options.
Now that we’ve got that out of the way, let’s add our first custom site. Finally, enabling PHP and Python on sites is done globally, so this setting applies to all sites hosted on the server. Also, Mountain Lion Server added web apps, which we’ll briefly review later in this article as well, as those continue in Mavericks Server, Yosemite Server, El Capitan Server and ultimately macOS Server 5.2 for Sierra. You don’t have to spend a ton of time looking for it as it isn’t there. Instead just add sites, which is covered next. Also, don’t remove the files that comprise the default site. So if you remove the site, your server will exhibit inconsistent behavior. The first is, the server is no longer really designed to remove the default website. Provided the stock macOS Server page loads, you are ready to use macOS Server as a web server.īefore we setup custom sites, there are a few things you should know. Once running, click on the View Server Website link at the bottom of the pane.
To set up the default web portal, simply open the Server app, click on the Websites service and click on the ON button.Īfter a time, the service will start. These patches are often mods, or modules. Configuring web services is as easy in macOS Server 5.2, running on Sierra (10.12), as it has ever been. Apache owes its name to the fact that it’s “a patchy” service. Web Services in macOS Server, Linux and most versions of Unix are provided by Apache, an Open Source project that much of the Internet owes its origins to.