I’m working with yii2 advanced template with docker. When I tried to use gii generator, I got the error “Forbidden (#403) You are not allowed to access this page.”
I added I’ve added allowedIPs on backend/config/main-local
but nothing changes.
Searching in the forum, I based on this post. To generate a virtual host for frontend and backend. I did the changes on /etc/apache2/sites-enabled$ sudo nano 000-default.conf
<VirtualHost *:80>
ServerName frontend.test
DocumentRoot /app/frontend/web
</VirtualHost>
<VirtualHost *:80>
ServerName backend.test
DocumentRoot /app/backend/web
</VirtualHost>
Also without success.
I am still with the problem. cannot access to gii generator
Here is the docker-compose file
version: '3.2'
services:
frontend:
build: frontend
ports:
- 20080:80
volumes:
# Re-use local composer cache via host-volume
- ~/.composer-docker/cache:/root/.composer/cache:delegated
# Mount source-code for development
- ./:/app
# virtual hosts
- ./apache_conf:/etc/apache2/sites-enabled/
backend:
build: backend
ports:
- 21080:80
volumes:
# Re-use local composer cache via host-volume
- ~/.composer-docker/cache:/root/.composer/cache:delegated
# Mount source-code for development
- ./:/app
# virtual hosts
- ./apache_conf:/etc/apache2/sites-enabled/