mhugo

Member
Mar 28, 2010
6
0
51
Hi there,

My brain must have sneaked away when I was sleeping.

Im trying to get xxx.xxx.xxx.xxx/~user to work as temporary url, but cpanel just says it cant find it.

The users exists and i can access the site from going to his domain name.

What have I disabled?
 

thewebhosting

Well-Known Member
May 9, 2008
1,199
1
68
Please make sure that you have not disalbed the mod_userdir from WHM for the domain. You can check it from WHM --> Security Center --> Apache mod_userdir Protection.
 

Spiral

BANNED
Jun 24, 2005
2,018
8
193
Side footnote, you can't use mod_userdir with non-DSO (php) based servers.

For these, either assign a dedicated IP to the account using the IP number as the "temporary address" or assign a subdomain as a parked domain of a valid domain already on the server.

Don't use http://x.x.x.x/~username type of addresses with these!
 

spellinn

Member
Jan 3, 2002
21
1
303
Side footnote, you can't use mod_userdir with non-DSO (php) based servers.

For these, either assign a dedicated IP to the account using the IP number as the "temporary address" or assign a subdomain as a parked domain of a valid domain already on the server.

Don't use http://x.x.x.x/~username type of addresses with these!
Can you explain why not?

Thanks


Neil
 

Spiral

BANNED
Jun 24, 2005
2,018
8
193
Can you explain why not?
Absolutely! When you access a site under a DSO based server,
the scripts are executed as the user "nobody" so the permissions are the same whether the visitor accesses the site by hostname, by IP address, or from some other site or hostname using mod_userdir (~username)

Under non-DSO servers (preferred for security and many other reasons), all scripts are executed on sites as the user owner which works find by direct domain address or IP but becomes problematic if you attempt to access sites by some other hostname, site, or account via mod_userdir means because the scripts will attempt to be executed as the effective ID of the site from which you are originally calling instead of the username of the owner and this is when the permission and ownership problems begin.

Mod_Userdir was ill conceived from the beginning and I don't recommend using it irregardless of what kind of server you have but in the case of non-DSO servers, you got more reasons to avoid using it.

For those who don't have their domain attached yet and need a temporary address, I would recommend parking a subdomain of another domain already active on the server on top of the account to act as a temporary address if you are unable to assign a dedicated IP address.
For those comfortable with httpd.conf editing, this is much better done by means of a "ServerAlias" in the virtualhost section for the site but could also be done by a simple subdomain parking on top of the account.