Show user content using subdomain I have a social content publishing site maintained in Drupal 7.  I want to show content only specific to a user when everyone visits the site using the user's user name as the subdomain.

For example when the mail site is 
www.example.com

And the user is john

When people visit the site using URL
john.example.com

I want to show only the content created by John, like that is his own site or book.  

When people visit the site www.example.com they shall see all content including John's content also.  This may mean Drupal 7 content shall be as usual , only the subdomain shall show content created by John.

It is not clear whether this can be achieved by Domain Access module, hence asking here to get more targetted answer from any one who may have done something like this.
You're really just passing an argument ("john") to a view (or multiple views, view blocks, etc.) to control what content is being displayed. I'm sure there is a way to do this in domain access but you can bypass that overhead by adding the logic in the view itself as a contextual filter. In rough detail:


Create your view listing the content you would want to show
Add a contextual filter based on Content: Author uid, and select 'provide default value'
I would recommend using 'PHP Code' to provide your default value and having it return value from a custom function which you can place in a module for better maintainability, ex: return _my_custom_function(); 


Your custom function should be returning the UID of the user you are looking for and could look something like this:

function _my_custom_function() { 

  $domain = $_SERVER['server_name']; //reserved php variable
  $host = explode('.', $domain);
  $subdomain = $host[0]; // probably a more elegant regex to use here.. 

  // your code here that takes the subdomain 'john', sanitizes it, runs security checks, then pulls the uid for this username from the user table or wherever

  return $uid;
}