# Apache does not display userdir inside jail



## bsduni (Oct 28, 2013)

I m running Apache 2.2 on a server FreeBSD 9.1 which has got a host and a jail named 'www'.
The host and the jail are running Apache, and are hosting web pages of two different URLs.

Now I want to allow users to have their own contents to be displayed like 
	
	



```
www.example.com/~user/index.html
```
 with their file /home/user/public_html/index.htm on both the host and the jail. So, I have mounted the users home directories on the host into the jail - www. 

Both on the host and the jail, I have included the following lines on httpd.conf:

```
LoadModule userdir_module libexec/apache22/mod_userdir.so
...
Include etc/apache22/extra/httpd-userdir.conf
```
I have also checked the  httpd-userdir.conf for the correctness and restarted 
	
	



```
httpd
```
 with `apachectl graceful`, both within the host and jail (by logging into the jail). No error messages received.

Now, I can see the users' html pages hoted within the host, but, not within the jail. Note that the webpage within the jail is browse-able.

Within the jail, I can see home/user/public_html/index.html and the access permissions are as follows:

```
# ls -al /home/user/public_html/
-rwxr-xr-x  1 root  wheel  45 Oct 28 10:37 index.html
# ls -al /home/user/public_html/
drwxr-xr-x  2 root  wheel  3 Oct 27 23:37 public_html
```

Checked /var/log/httpd-error.log within the jail to understand the error with `tail var/log/httpd-error.log` which says:

```
...
File does not exist: /usr/local/www/apache22/data/~user
```

Any clues why userdir contents are not displayed only within the jail?

Thank you in advance.


----------



## SirDice (Oct 28, 2013)

The user accounts on the host do not exist within the jail. For all intents and purposes treat a jail as a separate machine.


----------



## bsduni (Oct 29, 2013)

Thank you for the reply. Fixed the issue (NIS stopped working).


----------

