Tell me more ×
Server Fault is a question and answer site for professional 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:

http://example.com/~user1

But instead I would have URL looks like:

http://homes.example.com/user1

I understand I could simply use:

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

But this only works from the main domain

http://example.com/user1

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 – zwarag Feb 6 at 15:07
1  
Sounds like you applied the AliasMatch to the wrong virtual host. – mgorven Feb 6 at 19:45

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.