server {
	listen 443 ssl http2;
	listen [::]:443 ssl http2;

	ssl_certificate      /etc/ssl/private/whitedigital.local.crt;
    ssl_certificate_key  /etc/ssl/private/whitedigital.local.key;

	root /var/www/html/frontend/web;

	index index.php index.html index.htm;

	client_max_body_size 20m;

	server_name yii2skeleton.local.io;

	set $yii_bootstrap "index.php";
	location / {
	    try_files $uri $uri/ /$yii_bootstrap?$args;
	}

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

    }

    location ~ /\.ht {
        deny all;
  	}


}


server {
	listen 80;
	listen [::]:80;

	server_name yii2skeleton.local.io;

	return 301 https://$server_name$request_uri;

}

server {
	listen 443 ssl http2;
	listen [::]:443 ssl http2;

	ssl_certificate      /etc/ssl/private/whitedigital.local.crt;
    ssl_certificate_key  /etc/ssl/private/whitedigital.local.key;

	root /var/www/html/backend/web;

	index index.php index.html index.htm;

	client_max_body_size 20m;

	server_name admin.yii2skeleton.local.io;

	set $yii_bootstrap "index.php";
	location / {
	    try_files $uri $uri/ /$yii_bootstrap?$args;
	}

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

    }

    location ~ /\.ht {
        deny all;
  	}


}


server {
	listen 80;
	listen [::]:80;

	server_name admin.yii2skeleton.local.io;

	return 301 https://$server_name$request_uri;

}