Simple nginx configuration to launch wordpress site server { server_name yourdomain.com; root /var/www/wp; # path to wordpress index index.php; gzip on; # enable gzip compression gzip_disable “msie6”; gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript; location ~ /\. { deny all; # disable hidden files } location ~* /(?:uploads|files)/.*\.php$ { deny all; # disable uploaded scripts } location…
Category: Web server
php 7.4 + nginx quick start on Windows 10 / Server 2012 / 2016 / 2019
This article shows you how to quick install and integrate Nginx and PHP on Windows-based systems. 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 to c:\web nginx/Windows-1.19.8 Extract to C:\web\ To Install PHP Visit http://windows.php.net/download/ Download PHP For Windows: Binaries and sources Releases (7.4 -nts-vc15-x64) Extract to C:\web\php Edit file c:\web\conf\nginx.conf location / {…
How to redirect html site to https using htaccess
If you use apache web-server. Place .htaccess file to root site folder: