I have 26 virtual-host for subdomains (they were created type A, not CNAME type) of a page with domain "example1.com" (the domain was not being used) and I need to create the virtualhost to that domain
In% /etc/apache2/sites-available/
these 26 virtualhost have this form:
<VirtualHost subdomain1.ejemplo1.com:80>
ServerAdmin <correo@other_example.com>
DocumentRoot /var/www/html/subdomain1/
WSGIScriptAlias / /var/www/html/subdomain1/django.wsgi
Alias /static/ /var/www/html/subdomain1/static/
<Directory /var/www/html/subdomain1>
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/html/subdomain1/static>
Order allow,deny
Allow from all
</Directory>
ServerName subdomain1.ejemplo1.com
I also made the mistake of editing the 000-default.conf
<VirtualHost *:80>
ServerAdmin <correo@other_example.com>
#ServerName ejemplo1.com
#ServerAlias www.ejemplo1.com
DocumentRoot /var/www/html/ejemplo1_com/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
But you have not taken the contents of that folder
In /etc/hosts
I have this:
127.0.0.1 localhost
ip_example1 otro_name_host nombre_empresa
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Sincerely I do not know what those parameters are, that configuration was already like this.
I need 2 things:
1. correct the 000-default.conf
or delete it and create a ejemplo1_com.conf
2. create a ejemplo2_com.conf
(it's another totally different domain) and its virtualhost. Adding your info to /etc/hosts