Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
$ sudo apt-get install nginx

Insert or change the location section of the Make sure you have the following in your ngnix.conf file

Code Block
index index.php index.html index.htm

location / {

        set $a "";
        if ($uri = "/") {
                set $a 1;
        }
        if (-f /var/www/html/init/index.php) {
                set $a 1$a;
        }
        if (!-f /var/www/html/api/conf.d/config.php) {
                set $a 1$a;
        }
        if ($a = 111) {
                rewrite ^(.*)$ /init/index.php last;
        }
        # First attempt to serve request as file, then
        # as directory, then fall back to displaying a 404.
        try_files $uri $uri/ =404;
}

location = /api/conf.d/admin_channel.json {
		deny all;
		return 404;
	}

location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/run/php/php7.4-fpm.sock;
  }

...