# Configuration for generic $user.domain.tld to $homedir mapping

**URL:** <https://www.ruby-forum.com/t/configuration-for-generic-user-domain-tld-to-homedir-mapping/222137>\
**Category:** NGINX\
**Created:** [August 14, 2012, 10:22am UTC](https://www.ruby-forum.com/t/configuration-for-generic-user-domain-tld-to-homedir-mapping/222137 "2012-08-14T10:22:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [August 14, 2012, 10:22am UTC](https://www.ruby-forum.com/t/configuration-for-generic-user-domain-tld-to-homedir-mapping/222137/1 "2012-08-14T10:22:25Z")

</div>

Hi,

I’ve looked trough the web to find a solution, yet couldn’t find  
anything suitable.

Currently I’m using Apache, with a UserHostMacro directive  
that maps $user.domain.tld to /home/$user/public\_html

Is it possible to configure nginx to do the same?  
Any hints on how to proceed?

With kind regards,

–  
Wojtek Arabczyk

Posted at Nginx Forum:

> **[Configuration for generic $user.domain.tld to $homedir mapping](https://forum.nginx.org/read.php?2,229679,229679#msg-229679)**
>
> Hi, I've looked trough the web to find a solution, yet couldn't find anything suitable. Currently I'm using Apache, with a UserHostMacro directive that maps $user.domain.tld to /home/$user/public\_html Is it possible to configure nginx to do
