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

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?

share|improve this question
    
Ask a good question, and we'll give a good answer. This is not a good question (yet). Add more details, please. –  EEAA Apr 4 '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 4 '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 4 '11 at 15:30
    
Ah, ok, sorry, 1 sec. –  oshirowanen Apr 4 '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 4 '11 at 15:34

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer
    
Thanks, the first stage is already done. –  oshirowanen Apr 4 '11 at 15:46
    
Here is the new question: serverfault.com/questions/255510/sub-domain-via-apache –  oshirowanen Apr 4 '11 at 15:49

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.

share|improve this answer
    
Hello, please could post this question on this link? As I have already accepted an answer to this question. serverfault.com/questions/255510/sub-domain-via-apache –  oshirowanen Apr 4 '11 at 15:52

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.