2 Replies - 1829 Views - Last Post: 22 November 2012 - 11:02 AM

#1 pietomb00  Icon User is offline

  • D.I.C Head

Reputation: 12
  • View blog
  • Posts: 68
  • Joined: 28-June 11

Setting up a sub domain

Posted 22 November 2012 - 08:32 AM

Hi All,

I've got a domain name set up, and got a website on it - example.com, but I want to create a mobile version, so m.example.com. Not entirely sure how to go about this, I've tried editing the apache files, but not sure I've done it right. There's nothing in my httpd.conf file, and when I set up the initial website I used sites-available/default to change things.

So I've added

<Virtual host *:80>
ServerName m.example.com
ServerAlias m.example.com
Document Root /foo/bar/m.example
</Virtual Host>


But to no avail. Any ideas on how I should do this properly?

I'm using apache2 and it's on an Ubuntu 12.04 machine.

Is This A Good Question/Topic? 0
  • +

Replies To: Setting up a sub domain

#2 no2pencil  Icon User is offline

  • Admiral Fancy Pants
  • member icon

Reputation: 5388
  • View blog
  • Posts: 27,383
  • Joined: 10-May 07

Re: Setting up a sub domain

Posted 22 November 2012 - 09:02 AM

How are you handling dns for the regular domain name? You may have to add a cname (or aname? Sorry I have a head cold) to the dns entry.
Was This Post Helpful? 0
  • +
  • -

#3 pietomb00  Icon User is offline

  • D.I.C Head

Reputation: 12
  • View blog
  • Posts: 68
  • Joined: 28-June 11

Re: Setting up a sub domain

Posted 22 November 2012 - 11:02 AM

Hmm, I set that up with my domain registra (1&1), they have somewhere to put the IP in for the A Record. I had forgotten to do that for the subdomain so previously it had just been going to their default page. Now I've done that for the subdomain it just doesn't load anything.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1