Welcome! Log In Create A New Profile


drupal - multisite - webcrawlers

Posted by cisaksen 
drupal - multisite - webcrawlers
February 13, 2017 02:40PM
We have a drupal multi site (7)

root /srv/www/htdocs

location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
Following the nginx drupal sample configuration we have the above code.

We are seeing errors where a web crawler is somehow looking for site links using the root path instead of the actual website url. The site is one of the multi-sites with the .../htdocs/sites/sitename folder path. The link is a relative link so only the uri is in the href. So what we see in the error logs is a GET to {root-path}/uri.

What I'm wondering is if the fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; line could be causing these errors as it fits the path in the failed GET request.
If it is the cause is there another way of writing this line to work with any site under the main site. maybe changing the $document_root to the $hostname variable or something. Or does the SCRIPT_FILENAME need to be the actual path.

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 59
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready