-
Notifications
You must be signed in to change notification settings - Fork 306
4. Option 2). Use a simple config
Urban Sandén edited this page May 28, 2024
·
1 revision
- Edit
nginx/default.conf.conf
to use this simpler config (without using a cert and HTTPS)
server {
listen 80;
root /var/www/html/web;
index index.php;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
client_max_body_size 100M;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass wordpress:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
- Edit the nginx service in
docker-compose.yml
to use port 80. 443 is not needed now.
nginx:
image: nginx:latest
container_name: ${APP_NAME}-nginx
ports:
- '80:80'
- Continue on the Install step below