New to VPS trying to setup subdomaing for developing
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.