Symlink in document root produces error 404

Events happening in the community are now at Drupal community events on www.drupal.org.
heyyo's picture

Before starting, i should say I don't have this issue with Apache, only with Nginx. I'm using perusio config for Drupal 7.

I'm using the module subfolders domains (https://www.drupal.org/project/subfolders_domain) to create domains as subfolders(uri) of my main domain.
PS: This module is using the module Domain Access

This module creates symbolic links in drupal document root for each subfolder.

Example: in my Drupal document root I have several symlinks:

france -> /var/www/drupal
uk -> /var/www/drupal
index,php
modules
themes
sites...

If I browse to http://maindomain.com/france I should see the content of my subfolder france, but instead I see a 404 error.

I tried the setting disable_symlink
http://nginx.org/en/docs/http/ngx_http_core_module.html#disable_symlinks

But still no luck.

EDIT:

I have the feeling that nginx is not following the symlink before sending the url to Drupal. So Drupal is receiving this "/index.php?q=france" instead of just "/index.php".

I tried to create a symlink to an image in drupal root:
tree.png -> misc/tree.png

I have no problem to see this image in my browser.

So the problem seems to be only with symlinks and PHP.

Comments

any luck

hardcoredev's picture

Any luck with having subfolders_domain work with nginx?

Nginx

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: