By default, Homebrew will install all packages in the directory /usr/local/Cellar/, and also creates symbolic links at /usr/local/opt/ and /usr/local/bin/ (for executable files). Terminal /usr/local/Cellar/ /usr/local/opt/ /usr/local/bin/ Terminal % brew -v Homebrew 2.7.2 Homebrew/homebrew-core (git revision 3c379; last commit 2021-01-11) Homebrew/homebrew-cask (git revision 40d45; last commit 2021-01-11) P.S Tested with Homebrew 2.7.2 and macOS Big […]

Read more Where does Homebrew install packages on Mac?

We installed Nginx, MariaDB, PHP, and WordPress on Mac OS. The homepage is displayed fine, but all other pages are returning 404 errors? Tested with Nginx 1.17.9 WordPress 5.4 PHP 7.4 Review the current Nginx + WordPress integration. nginx.conf server { listen 8080; server_name localhost; root /usr/local/var/www/wordpress; location / { index index.html index.htm index.php; } […]

Read more Nginx + WordPress, 404 errors for all pages?

Fresh installs a WordPress on Windows for development, and hits the ERR_TOO_MANY_REDIRECTS error message? Tested URL : http://localhost/index.php/wp-admin/install.php Tested : PHP 7.1.10 WordPress 4.8.3 Nginx 1.12.1 MySQL 5.7.17 Windows 10 your-nginx\conf\nginx.conf upstream php { server 127.0.0.1:9999; } server { listen 80; server_name localhost; root www/wordpress; location / { try_files $uri $uri/ /index.php?$args; } location ~ […]

Read more Nginx + WordPress ERR_TOO_MANY_REDIRECTS

This article shows you how to install and integrate Nginx and PHP on Windows. Tested Nginx 1.12.1 PHP 7.1.10 Windows 10 1. Install Nginx + PHP Basically, just download zip file and extracts it, no installation. To install Nginx Visit http://nginx.org/en/download.html Download nginx/Windows-1.12.2 Extract to C:\nginx-1.12.1 To Install PHP Visit http://windows.php.net/download/ Download PHP7.1 download VC14 […]

Read more Nginx + PHP on Windows

Run php-cgi.exe and hits a pop up dialog showing the following error message : Application Error : The application was unable to start correctly (0xc000007b) Terminal c:\php7.1>php-cgi.exe -b 127.0.0.1:9123 Tested with PHP 7.1.10 on Windows 10 Solution To run PHP on Windows, you need to install Redistributable for Visual Studio, refer to the official PHP […]

Read more php-cgi.exe – The application was unable to start correctly

A common Nginx + PHP error message “No input file specified.” nginx.conf http { include mime.types; default_type application/octet-stream; server { listen 80; server_name localhost; location / { root www; index index.html index.htm; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9999; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } } Tested with Nginx 1.12.1 + PHP […]

Read more Nginx + PHP – No input file specified

In this article, we will show you how to block referrer spam in one of our Nginx web server. 1. Find the Patterns Check the Nginx access.log file, and identify the “referrer spam” patterns. $ sudo tail -f /var/log/nginx/access.log Some patterns : 200 http://???.ru/engine/redirect.php?url=http://mywebsite.com/site/blogspot.com.au 200 http://???.com/tp/out.php?link=alternatevideo&url=http%3A//mywebsite.com/site/readyliftproshop.com 200 http://???.edu/online/redirect.asp?url=http://mywebsite/site/wheretoshophongkong.com We are going to block following patterns […]

Read more Nginx : Block Referrer Spam

In Nginx, you can block certain user agents (normally it is crawler) like this : /etc/nginx/sites-enabled/default server { listen 80; server_name mysite.com; root /etc/tomcat7/webapps/mysite; if ($http_user_agent ~* (ahrefs|wget|crawler|majestic) ) { return 403; } location / { <!– xxx –> } } In above example, for “user agent” that contains one of this pattern : ahrefs|wget|crawler|majestic, […]

Read more Nginx : Block User Agent