Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

drupal - multisite - webcrawlers

$
0
0
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.

Thanks

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>