How to resolve “You don’t have permission to access this resource.” yii2 app with docker on azure platform?

I have dockerized a yii2 app and local I can run the docker containers.

But I try now with a container registry and an web app to push the app on the azure cloud platform.

But on address: https://internetsuite2-0.azurewebsites.net/

I get every time the message:

Forbidden
You don't have permission to access this resource.

Apache/2.4.59 (Debian) Server at internetsuite2-0.azurewebsites.net Port 80

And I have tried a lot of thinks. I found an thread on this link:

https://learn.microsoft.com/en-us/answers/questions/208910/forbidden-you-dont-have-permission-to-access-this

I deleted the repository. And pushed again the whole folder to the repository. I restarted the app. But without results.

This is the dockerfile:

FROM yiisoftware/yii2-php:8.2-apache

RUN a2enmod rewrite

WORKDIR /internetsuite_2.0_backend

COPY . /internetsuite_2.0_backend

ADD composer.lock composer.json /internetsuite_2.0_backend/
RUN composer install --prefer-dist --optimize-autoloader --no-dev && 
    composer clear-cache

RUN mkdir -p runtime web/assets && 
    chmod -R 775 runtime web/assets && 
    chown -R www-data:www-data runtime web/assets

RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf

RUN service apache2 restart

docker-compose.yml:

version: "3.8"
services:
  php:
    image: crinternetsuite20backendtest.azurecr.io/web1
    container_name: yii2
    build:
      context: ./
      dockerfile: Dockerfile
    restart: always
    volumes:
      - ~/.composer-docker/cache:/root/.composer/cache:delegated
      - ./:/app:delegated
    #command: php-fpm -R # Allow running FPM as root
    ports:
      - "8000:80"
    env_file:
      - ./.env
    networks:
      - yii
networks:
  yii:

web.php in config:

<?php
// phpcs:ignoreFile

$params = require __DIR__ . '/params.php';
$db = require __DIR__ . '/db.php';

$config = [
    'id' => 'basic',
    'name' => 'internetsuite 2.0',
    'basePath' => dirname(__DIR__),
    'bootstrap' => ['log'],
    'aliases' => [
        '@bower' => '@vendor/bower-asset',
        '@npm'   => '@vendor/npm-asset',
    ],
    'modules' => [
        'v1' => [
            'class' => 'appmodulesv1Module',
        ],
    ],
    'components' => [
        'request' => [

            'parsers' => [
                'application/json' => 'yiiwebJsonParser',
            ],
            // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
            'cookieValidationKey' => 'OEtCunrAfQNETtmUSDnZw1JPHTB44i3A',
        ],


        'cache' => [
            'class' => 'yiicachingFileCache',
        ],
        'user' => [
            'identityClass' => 'appmodelsUser',
            'enableAutoLogin' => true,
        ],
        'errorHandler' => [
            'errorAction' => 'site/error',
        ],
        'mailer' => [
            'class' => yiisymfonymailerMailer::class,
            'viewPath' => '@app/mail',
            // send all mails to a file by default.
            'useFileTransport' => true,
        ],
        'log' => [
            'traceLevel' => YII_DEBUG ? 3 : 0,
            'targets' => [
                [
                    'class' => 'yiilogFileTarget',
                    'levels' => ['error', 'warning'],
                ],
            ],
        ],
        'db' => $db,
        'urlManager' => [
            'enablePrettyUrl' => true,
            'showScriptName' => false,
            'enableStrictParsing' => true,
            'rules' => [
                [
                    'class' => 'yiirestUrlRule',
                    'controller' => ['v1/user', 'v1/product'],
                    'pluralize' => false,
                    'extraPatterns' => [
                        'OPTIONS login' => 'options',
                        'OPTIONS signup' => 'options',
                        'OPTIONS user' => 'options',
                        'POST signup' => 'signup',
                        'POST login' => 'login',
                        'GET user' => 'user',
                        'GET index' => 'index'
                    ],
                ],
            ],
        ],

    ],
    'params' => $params,
];


if (YII_ENV_DEV) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = [
        'class' => 'yiidebugModule',
        // uncomment the following to add your IP if you are not connecting from localhost.
        'allowedIPs' => ['127.0.0.1', 'https://internetsuite2-0.azurewebsites.net', '::1'],
    ];

    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = [
        'class' => 'yiigiiModule',
        // uncomment the following to add your IP if you are not connecting from localhost.
        'allowedIPs' => ['127.0.0.1', 'https://internetsuite2-0.azurewebsites.net', '::1'],
    ];
}

return $config;

and index.php:

<?php
$path = dirname(__DIR__);
require $path . '/vendor/autoload.php';

$dotEnv = DotenvDotenv::createMutable($path);
$dotEnv->load();

defined('YII_DEBUG') or define('YII_DEBUG', $_ENV['YII_DEBUG']);
defined('YII_ENV') or define('YII_ENV', $_ENV['YII_ENV']);



require $path . '/vendor/yiisoft/yii2/Yii.php';

$config = require $path . '/config/web.php';

try {
    (new yiiwebApplication($config))->run();
} catch (yiibaseInvalidConfigException $exception) {
    echo $exception->getMessage();
}

I realy stuck on this issue.

Question: how to resolve the message: You don't have permission to access this resource. on azure?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật