~username multi-domain preview

roop

Verified User
Joined
Feb 10, 2007
Messages
7
Hi Everyone,

I'm aware of the http://host.name/~username hack to preview a user's site before the DNS updates, but it doesn't appear to work if the user account has multiple domains. I've tried:

http://host.name/~username/domain.com/
http://host.name/~username/domains/domain.com/
http://host.name/~username/domains/domain.com/public_html/
http://host.name/~domain.com/


I occasionally need this sort of thing, but only every 4-6 months or so I don't want to start hacking httpd or symlinking directories etc.


Is there something else I can use?


Thanks,

Rupert
 
Last edited:
It only works off the main public_html in users folder.

In order for it to work like that you would have to create a custom directory listing in apache.

Does just ~username work or not?

In order for it work you would have to add something like this to /etc/httpd/conf/httpd.conf

Code:
<Directory /home/*/domains/*/public_html>
    AllowOverride FileInfo AuthConfig Limit Indexes
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS PROPFIND>
    Order allow,deny
    Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
        Order deny,allow
        Deny from all
</LimitExcept>
</Directory>
 
Back
Top