# redirect server error pages to the static page /50x.html #log_format main '$remote_addr - $remote_user "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"' From a Terminal window type sudo open /usr/local/etc/nginx/nf -a TextEditĪnd replace the contents of the file with user yourusername staff Įrror_log /var/log/ notice You can configure NginX by editing the files inside the /usr/local/etc/nginx directory.įirst, we need to edit the /etc/nginx/nf file because the default is a bit problematic. Now we need to create a few links to let us easily configure NginX and start it automatically. Open a Terminal window and enter the following command: brew install nginxĪfter a couple of minutes it should tell you that the installation is complete. HomeBrew is a package manager for Mac OS X which lets you install a lot of software without hunting around the Internet for a suitable package file. If you don't have HomeBrew already you need to install it per its instructions. In case you're wondering, you can of course use it in parallel with MAMP, XAMPP or even the multi-PHP version server I've described in an earlier post. In this how-to we'll see how you can set up NginX, a high performance web server, with the PHP version shipped with Mac OS X itself to create a local web server. If you want to start developing PHP applications, or merely work on your PHP-based site off-line, on Mac OS X you can easily do so.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |