Closed mikedoubintchik closed 6 years ago
I realized the trick was to enable subdomains instead of subfolders and listing out all of the subdomains in the frontend rule of the nginx container.
Does anyone know how to accomplish the same thing with subfolders and perhaps a regular expression instead of listing each specific item.
I use subdomains only.
And i use next rule for nginx container
- 'traefik.frontend.rule=HostRegexp:{subdomain:.+}.yoursite.dev,yoursite.dev'
What is your nginx image tag?
@TrilipuT Thank you. That's exactly what I was looking for!
@csandanov I'm using wodby/wordpress-nginx:4-1.13-2.2.0
For apache installation and multisite with subfolders, I found a workaround modifyng .htaccess only.
Simply add "DirectoryIndex index.php" to the top.
It seems that apache installation have no default conf. example of this .htaccess:
DirectoryIndex index.php
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
@TrilipuT With your subdomain wildcard rule, it seems like none of the other container rules work. For example, I can't reach pma.wp.docker.localhost. Any ideas how to get around this?
Codebase
Mounted vanilla multisite codebase
Host OS
macOS Sierra
Docker info output
Docker compose file
Logs output