PDA

View Full Version : New to VPS trying to setup subdomaing for developing



sebas9673
2012-04-27, 01:29 AM
Hi i have a VPS with myhosting and no panels, i configure the vps by ssh. However i have never setup a subdomain and im failing at it. My host is expo-eventos.com, i already added the subdomain dev.expo-eventos.com and created the virtual servers in httpd.conf and also i got another ip to asign to the subdomain. At least this is what i thought i needed but its not working. Here is the virtual servers config:

<VirtualHost 168.144.28.57:80>
ServerAdmin sebastianviteri@gmail.com
DocumentRoot /var/www/html
ServerName http://www.expo-eventos.com
ServerAlias expo-eventos.com
ErrorLog logs/expo-error-log
CustomLog logs/expo-eventos.com-access_log common
</VirtualHost>
<VirtualHost 168.144.28.189:80>
ServerAdmin sebastianviteri@gmail.com
DocumentRoot /var/www/dev
ServerName http://www.dev.expo-eventos.com
ServerAlias dev.expo-eventos.com
ErrorLog logs/dev.expo-error-log
CustomLog logs/dev.expo-eventos.com-acces_log common
</VirtualHost>

So i can enter the dev directory with the IP address but if i use http://www.dev.expo-eventos.com it takes me to the html directory.
Please help i have no idea how to setup this correctly.

suwunk
2012-04-27, 09:40 AM
Hi There,

Have you tried to follow this following Knowledge Base article
http://myhosting.com/kb/Creating_and_Assigning_Subdomains

Cheers

jeremya
2012-04-27, 03:11 PM
Hi i have a VPS with myhosting and no panels, i configure the vps by ssh. However i have never setup a subdomain and im failing at it. My host is expo-eventos.com, i already added the subdomain dev.expo-eventos.com and created the virtual servers in httpd.conf and also i got another ip to asign to the subdomain. At least this is what i thought i needed but its not working. Here is the virtual servers config:

<VirtualHost 168.144.28.57:80>
ServerAdmin sebastianviteri@gmail.com
DocumentRoot /var/www/html
ServerName .: Expoeventos (http://www.expo-eventos.com)
ServerAlias expo-eventos.com
ErrorLog logs/expo-error-log
CustomLog logs/expo-eventos.com-access_log common
</VirtualHost>
<VirtualHost 168.144.28.189:80>
ServerAdmin sebastianviteri@gmail.com
DocumentRoot /var/www/dev
ServerName .: Expoeventos (http://www.dev.expo-eventos.com)
ServerAlias dev.expo-eventos.com
ErrorLog logs/dev.expo-error-log
CustomLog logs/dev.expo-eventos.com-acces_log common
</VirtualHost>

So i can enter the dev directory with the IP address but if i use .: Expoeventos (http://www.dev.expo-eventos.com) it takes me to the html directory.
Please help i have no idea how to setup this correctly.

Hi there!

Server-wise, you're setup A-OK! The only problem you're currently having is that your subdomain .: Expoeventos (http://www.dev.expo-eventos.com) is pointing to the first IP not the second one.

All you need to do now is add the A record to your dev.expo-events.com subdomain.

To do this,

1) Log into your control panel with us (http://manage.myhosting.com)
2) Navigate to your subdomain under Sites & Domains.
3) Click on your dev.expo-events.com subdomain
4) Click the DNS tab, then click DNS Records just below the tabs and lastly, click Add New DNS Record
5) Choose A record from the list, add www into the first field, and your second IP into the next field. Finish, give it time to propagate over the internet (can take an hour but usually less) and you should be up and running!

greenmatter
2012-04-28, 02:43 PM
Thanks!




http://www.imgsnatch.com/img/n/9.jpg

sebas9673
2012-04-28, 06:03 PM
Thanks jeremya yes that was it, i was actually thinking that it had something to do with registering that ip with the subdomain in a dns server but i had no idea where or how to do it. Thank you!