aschmelyun / docker-compose-wordpress

A docker-compose workflow for local WordPress development
241 stars 151 forks source link

You're making a very good yt tutorial about this topic! #14

Open technout opened 1 year ago

technout commented 1 year ago

But I've a question about the combination of wordpress container and nginx: Can you explain how to config nginx (and maybe wordpress container itself) so that wordpress can be reached as in a sub directory?

I tried it with this config (and some others) but i cannot figure it out..

server {
  listen 443 ssl http2;
  server_name localhost mydomain.com;

  location /wpsubdir {
    rewrite ^/wp-admin/(.*)$ /$1 break;
    proxy_pass http://localhost:8081/;
    proxy_redirect http://localhost:8081/ /wpsubdir/;
  }
}