We want to store our web site in the folder of our choice, and access to the URL To do this, edit the configuration file: nano /usr/local/etc/nginx/nf To install and launch Nginx on startup, we use: brew install nginxĪlthough we musn’t use sudo with brew install, it is necessary to use it to launch Nginx if we want to use the the default port 80. ![]() NginxĪlthough Apache is natively included with macOS, we propose here to install Nginx, particularly lightweight and easily configurable. If you do not already have them, macOS will prompt you to first install Xcode Command Line Tools. To install, simply execute the command shown on the official website: /bin/bash -c "$(curl -fsSL )" HomeBrew is a package manager for macOS, that allows to easily install various Unix applications. ![]() We will see how to install Nginx, PHP-FPM and MariaDB (MySQL) on macOS High Sierra thanks to Homebrew package manager. ![]() Seeking a satisfactory solution to create a local web server for programming in macOS with PHP and MySQL, I was disappointed that the turnkey solutions were far from equaling the WAMP that may exist on Windows.īut I forgot macOS is a Unix system, and unlike Windows, it’s perfectly possible to create a customized local server with some packages. Setting up a Nginx server on macOS – Sylvain Durand sylvain durand Setting up a Nginx server on macOS
0 Comments
Leave a Reply. |