lukas81298
lukas81298

Reputation: 51

Apache subdomain for every user

I am working on a blogging service and want every account to have its own subdomain. Currently, the urls are http://example.com/blog/username, but I want them to be username.example.com. I already created a wildcard record pointing to my server and I am using Apache2.

I did not find any thread which covers this question here. If there is one, it would be great if you could send its link it to me.

Thank you

Upvotes: 1

Views: 203

Answers (1)

Boris
Boris

Reputation: 2273

What you are trying to accomplish should be fairly trivial with the help of the mod_vhost_alias module. Since you only asked for the link, here is the one on the apache website that will show you how to dynamically configure mass virtual hosting: http://httpd.apache.org/docs/2.4/vhosts/mass.html

Everything you need is included on the linked page. Also, to read more about the mod_vhost_alias configuration options go to http://httpd.apache.org/docs/2.4/mod/mod_vhost_alias.html

Upvotes: 1

Related Questions