# Nginx and PHP Setup on Windows For local development you could also use Nginx with PHP as an replacement for XAMPP. # Install Nginx * Download Nginx for Windows: http://nginx.org/en/download.html | Direct: [nginx-1.19.7.zip](http://nginx.org/download/nginx-1.19.7.zip) * Extract the ZIP file to `c:\nginx` * Open the file `c:/nginx/config/nginx.conf` and replace the `server { ... }` section with this configuration: ```conf server { listen 80; server_name localhost; index index.php; error_log c:/nginx/logs/localhost.error.log; access_log c:/nginx/logs/localhost.access.log; root c:/nginx/html; location / { try_files $uri /index.php$is_args$args; } location ~ \.php { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_index index.php; fastcgi_pass 127.0.0.1:9123; } } ``` * Create a file `c:/nginx/html/index.php` and copy/paste this content: ```php