Limit access to subsite I googled for it but couldn't find anything about that.
Is it possible to create drupal website (example.com) with subsites (example.com/subsite1 and example.com/subsite2) where access to them are limited to:


2 users on example.com/subsite1
users on example.com/subsite2
no limits on example.com/"


I want to share some digital content on those subsites to not more than X users at time.
There's no built-in way to do this, afaik. Are the sites truly separate sites? Drupal multi-site? 

You could build a custom module that uses one of the hook_preprocess_XXX functions.  In that function you could do a mysql query with the "sessions" table.  If there are 2 active sessions, block/redirect the user.  Session management would be tricky though.  You'd want to change the session timeout length for that site, and also encourage your users to logout when they're done browsing to make room for the next guy.

edit: process for the content type,  or you could look in to hook_menu functions which might be cleaner, though I am not sure it will work.