Hello great linux ninjas.
I'm working on AWS ec2 ubuntu, and I need to create a subdomain. I have seen some tutorials but none worked.
I created a file in:
called admin.conf. In the file I put:/ etc / apache2 / sites-available /
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName subdominio.site.com.br
ServerAlias www.subdominio.site.com.br
DirectoryIndex index.html
DocumentRoot /var/www/site2
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
No 000-default.conf is:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName site.com.br
ServerAlias www.site.com.br
DirectoryIndex index.html
DocumentRoot /var/www/site1
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
The site is opening normal, but the subdomain is not opening. It says: "Can not find this server's IP address"
Could you help me? Really grateful!