PHP Windows

How to fix moodle Installation error of Nginx in windows

Moodle (Modular Object-Oriented Dynamic Learning Environment) is a free and open-source LMS (learning management system) written in PHP and distributed under the GPL License.

As a Windows user, I prefer to use Laragon as a powerful universal development environment for PHP. And for the server, I always go for Nginx.

Do you ever face any setup errors during the installation process of moodle in the Nginx server?

There are several solutions to fix it but we try to follow the best practice.

Slash arguments error of Nginx in Moodle installation process

This is usually happened because ‘slash arguments’ compatible ‘location’ block to your vhosts ‘server’ in your Nginx configuration.

We have the default Nginx configuration file below

server {
    listen 8080;
    listen 8443 ssl;
    server_name moodle.test *.moodle.test;
    root "D:/moodle";
    index index.html index.htm index.php;
    location / {
        try_files $uri $uri/ /index.php$is_args$args;
		autoindex on;
    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass php_upstream;		
        #fastcgi_pass unix:/run/php/php7.0-fpm.sock;

    # Enable SSL
    ssl_certificate "E:/laragon/etc/ssl/laragon.crt";
    ssl_certificate_key "E:/laragon/etc/ssl/laragon.key";
    ssl_session_timeout 5m;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
    ssl_prefer_server_ciphers on;
    charset utf-8;
    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }
    location ~ /\.ht {
        deny all;

# This file is auto-generated.
# If you want Laragon to respect your changes, just remove the [auto.] prefix

Just replace the red location block with the new location block

location ~ [^/]\.php(/|$) {
fastcgi_split_path_info  ^(.+\.php)(/.+)$;
fastcgi_index            index.php;
fastcgi_pass             php_upstream;
include                  fastcgi_params;
fastcgi_param   PATH_INFO       $fastcgi_path_info;
fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;

Reload the previous Installation page. I think It should be fixed now.

Happy Coding 😃


How to disable password prompts during git push/pull

Firstly, Generate an SSH key into your server/localhost

ssh-keygen -t rsa -b 4096 -C "Your Email Address"

You will Get your .ssh/ Copy the Key and Add a Aew SSH Key like the above image.

Now register the key with your Github Username

ssh -i ~/.ssh/ -T your

You are Good to go now.

Copy the SSH link and Run it into your server app directory terminal

git clone
That’s it. It’s done withour your github username/password.

How to resize thousands of images in multiple folders?

I have been working to migrate an Osclass classified website to Custom made Laravel ad listing E-commerce solution for 2 weeks. It has more than 1,20,000 uncompressed preview and thumbline images that cause the slow page load issue. I was desperately seeking a minimal solution to resize thousands of images in multiple folders.

My OS is windows 10. After few hours of google search, got a few applications that serves my partial requirements but xnview (FREEWARE) an awesome application for bulk image resizing that fulfill my needs.

I need to unchanged the Images folder staructure and keep image extension same as source. I could do this by using this application but an afficient way.

Multiple CPU core Suppor

It has multiple CPU core support that makes it blazing fast image resizing tool.

Load image tab

So, let’s start. You may select single image (Add Files) of multiple folders (Add folder) with images and click Next.

Action Tab

Fix your desired setup and click Next

Output Folder Setup

Don’t forget to check the keep folder structure in order to keep the previous folder structure same as source.

Now click Convert and That’s it !!!


Change/Modify environment variables without rebooting windows

  1. Search environment in the search bar

Click Edit the System Environment variables & edit as required

2. Open Command Prompt as Administrator

3. Type set PATH=C & Press Enter (This will refresh the environment variables)

4. Close and restart command prompt window

5. Finally, type echo %PATH% & press Enter

This will automatically Refresh your windows environment variables.