Hello,
I want to setup a subdomain in my droplet, I read and follow this tutorial: https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-debian-7
Yep, all right. But, not work for me.
First, I point the dns of my domain in godaddy to: NS1.DIGITALOCEAN.COM. NS2.DIGITALOCEAN.COM. NS3.DIGITALOCEAN.COM.
Then, I installed apache2:
#apt-get install apache2
I created the directory for my domain in /var/www/mydomain.com And for my subdomain: /var/www/mydomain.com/subdomain
I copied the file /etc/apache2/sites-available/default and name mydomain.com and other with name subdomain.mydomain.com (all in this same directory).
I opened the file mydomian.com and add this line: ServerName mydomain.com
And change this: DocumentRoot /var/www/mydomian.com
Then, the same for the file subdomain.mydomain.com
Add the line: ServerName subdomain.mydomain.com
And change this: DocumentRoot /var/www/mydomian.com/subdomain
FInally:
#a2ensite mydomain.com and #a2ensite subdomain.com
Then:
#service apache2 reload
But not work!
The domain : mydomain.com works great, very great, but the subdomain doesnt.
In my browser I see this error code: Código de error: ERR_NAME_NOT_RESOLVED
Well, I tried to set the subdomain in my droplet cpanel add this A record: A mydomain.com ip.ip.ip.ip
But nothing. :(
Why? ?
Ps. Sorry for my bad english.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
DNS is cached and takes time to propagate. Also, please don’t redact anything except passwords. It makes it harder to help you in nearly every situation and makes it impossible in some.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.