1

UPDATE 2:

Our website is created on RedHat Linux. We are using Apache as the web server software. Basically, we have our website on a LAMP configuration. We use rackspace managed hosting, but they do not manage our dns records. Our DNS records are managed by verizon, for which I have access too also.

UPDATE 1:

How do I create a sub-domain for our existing domain? If our existing domain was companyname.com, we would want a subdomain like users.companyname.com.

ORIGINAL QUESTION:

I've been given access to our dns records and need to create a sub domain. We currently have

companyname.com and www.companyname.com go to our web host at say 00.000.000.00

How do I create a new dns record so we can point users.companyname.com to a folder on our server at 00.000.000.00 instead of it going to the webroot of 00.000.000.00?

oshirowanen
  • 292
  • 4
  • 13
  • Ask a good question, and we'll give a good answer. This is not a good question (yet). Add more details, please. – EEAA Apr 04 '11 at 15:25
  • I've added update 1 to the original question, but not sure how to make this question a good question? The question I have is literally that I need to make a subdomain work on our website. – oshirowanen Apr 04 '11 at 15:29
  • Okay, by "add more details", I meant adding something like what software and/or operating system you're using. – EEAA Apr 04 '11 at 15:30
  • Ah, ok, sorry, 1 sec. – oshirowanen Apr 04 '11 at 15:30
  • Thanks, I've added update 2. Basically, we have our website on a LAMP configuration. We use rackspace managed hosting, but they do not manage our dns records. Our DNS records are managed by verizon, for which I have access too. – oshirowanen Apr 04 '11 at 15:34

2 Answers2

1

DNS will only point you to the IP/server. Then you must use Apache to direct to a different folder. First setup the CName or A record with Verizon's interface for DNS. Point to the server that will be hosting the site. You can confirm that it works by pinging the name and getting the correct IP back.

Then the next step isn't related to DNS. It's Apache related. If you still have questions about that, start a fresh question or re-flag this as an Apache question.

Scott Forsyth
  • 16,449
  • 3
  • 37
  • 56
0

If someone types http://sub1.domain.com then it will point to http://domain.com/sub1/

Solution: RewriteCond %{HTTP_HOST} !^(www|ftp|mail).example.com RewriteCond %{HTTP_HOST} ^([^.]+).example.com RewriteRule (.*) /subd_%1/$1 [L]

Check your .htaccess file.

Your question was not that bad, just need to know what you used for serving.

Seth
  • 334
  • 2
  • 9
  • 21
  • Hello, please could post this question on this link? As I have already accepted an answer to this question. http://serverfault.com/questions/255510/sub-domain-via-apache – oshirowanen Apr 04 '11 at 15:52