Files
org-roam/20230418135928-nginx.org
2025-11-05 09:18:11 +01:00

1.7 KiB

nginx

nginx is a reverse proxy webserver. Runs as docker container

the config

wordpress

~/wordpress-compose/nginx/wordpress.conf

~/wordpress-compose/docker-compose.yml

Parameter:

For uploading pluig-ins which bigger than 2MB on the wordpress-local-site: in wordpress.conf the following line under "server": max_body_size 25M; The application should look like this:

  
server {
    listen 80;
    server_name wp-hakase.co;
root /var/www/html;
index index.php;
proxy_buffering off;
proxy_buffer_size 16k;
proxy_busy_buffers_size 24k;
proxy_buffers 64 4k;
client_max_body_size 25M;
access_log /var/log/nginx/hakase-access.log;
error_log /var/log/nginx/hakase-error.log;

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;
}
}

It is of utmost importance to set the reverse prtoxy to the same docker-network as the other container that should be used with the reverse proxy. This can be done inside the docker-compose file or via the

  --network "<network name>"

of the docker run command.