Skip to content

Drupal multisite using sub-directories and nginx/apache config #7279

Answered by DavidRWB
DavidRWB asked this question in Q&A
Discussion options

You must be logged in to vote

Hi again, just an FYI. Thanks for a pointer about nginx. That helped. Firstly, changing the server type to apache-fpm resolved it and everything worked as expected.

So I checked the server type back to nginx, and in the nginx config added thes lines below the default location config (and removed the autogenerated comment line of course): -

location / {
absolute_redirect off;
try_files $uri $uri/ /index.php?$query_string; # For Drupal >= 7
}

location /xyz/ {
absolute_redirect off;
try_files $uri $uri/ /xyz/index.php?$query_string; # For Drupal >= 7
}

P.S. If there's a more compliant way to do this, e.g. adding something extra to the config.yaml, please let me know. Editing the auto-generat…

Replies: 6 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@rfay
Comment options

rfay May 9, 2025
Maintainer

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@rfay
Comment options

rfay May 12, 2025
Maintainer

Answer selected by DavidRWB
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants