So guys, I think it's some configuration on the server that is not displaying the error page, I am running a docker-compose
that "uploads" a container php, mysql, and nginx , however, when accessing localhost I get the following error:
- 403 Forbidden
Follow the nginx configuration file:
server {
listen 80;
index index.php index.html;
server_name localhost;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
root /code;
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
And the docker-compose to take the curiosity:
version: '2'
services:
web:
image: nginx:latest
ports:
- "80:80"
volumes:
- ./code/public_html:/code
- ./site.conf:/etc/nginx/conf.d/default.conf
links:
- php
php:
image: php7-custom-conf
volumes:
- ./code/public_html:/code
links:
- db
db:
image: mysql:5.7
volumes:
- "./.data/db:/var/lib/mysql"
restart: always
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: dbrootpass
MYSQL_DATABASE: dbname
MYSQL_USER: dbuser
MYSQL_PASSWORD: dbpass
All the help is welcome, it's the end of the semester and I can not really see the error, thanks in advance.