:PROPERTIES: :ID: 0b50e19a-0608-434c-a57c-fd719e3bb8bf :END: #+title: nginx nginx is a reverse proxy [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][webserver]]. Runs as [[id:df046fd7-1f82-4e12-9065-56d222f56408][docker]] [[id:936191f2-696b-4d9a-96ad-c8449778ae26][container]] * the config ** [[id:e1eac0f9-5b66-436a-8624-d5ea49e1204b][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: #+begin_src 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; } } #+end_src It is of utmost importance to set the reverse prtoxy to the same [[id:9d04fac3-89ae-4a96-b326-9ae7e2c22118][docker-network]] as the other [[id:936191f2-696b-4d9a-96ad-c8449778ae26][container]] that should be used with the reverse proxy. This can be done inside the [[id:fcbfabfa-4a8c-4826-8b57-5dce05965c76][docker-compose]] file or via the #+begin_src bash --network "" #+end_src of the docker run command.