Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'd like to avoid using ~ for serving user public_html content (apache2). By default the following is working nicely:


But instead I would have URL looks like:


I understand I could simply use:

AliasMatch ^/([a-zA-Z0-9]+)/?(.*) /home/$1/public_html/$2

But this only works from the main domain


and not within a 'homes' subdomains...

share|improve this question
Well it might be more elegant to create a /var/www/home/ folder and create in this folder your user home folders like /var/www/home/user1. Then you make a link to /home/ and in this way your users can access stuff as usual, but you'll keep stuf that is available from the internet there where it belongs. in the /var/www –  Harrys Kavan Feb 6 '13 at 15:07
Sounds like you applied the AliasMatch to the wrong virtual host. –  mgorven Feb 6 '13 at 19:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.