![]() ![]() You should create a zone to make it a subdomain. One thing for you to consider is that sub is not a subdomain of domain.io as you exposed it, it is only a host for domain.io. Sub 10800 IN CNAME 10800 IN CNAME don't know if that syntax is valid, maybe: sub 10800 IN CNAME domain.io.Ī third option would be generating all A records, pointing to the direct IP, maybe just harder to maintain in a bigger environment but equally effective: sub 10800 IN A 1.1.1.1 Or in your case you may point the CNAMES to where you set the IP: 10800 IN SOA. I used the DNS from my domain to be more realistic to your scenario and it worked the same way as using the hosts file, using CNAME or using A records, both of them worked correctly.Īs a personal preference, I would say that the A record should be a name for the server, and then CNAMEs for the different host headers, something like (your server for me is 1.1.1.1): webserver01 10800 IN A 1.1.1.1 To see if you have any outstanding alerts in the apache service you could use journalctl -u apache2 DNS ![]() I don't see why yours would not be working. Moreover, using the "Tamper Data" plugin for firefox I started manipulating the Host header on each request and the response changes in relation to it as expected. Restarted Apache: systemctl restart apache2 To simulate the DNS I edited the /etc/hosts file including: #. This may not answer your question, but, I prepared your same scenario, used your same files changing only the DocumentRoot and the order is reversed as I told you in the comments: # /etc/apache2/sites-enabled/000-domain.io.confĭocumentRoot /var/www-data:www-data /var/www/html/serverfault/ -R ![]() Is there some easy way to fix this (I always found apache url rewriting pretty obscure)? I naively thought that apache would analyze the request url to dispatch between the different VHosts but it seems that I've been naive. I redirected to domain.io on my DNS provider (Gandi). edit in sites-available -> a2ensite -> systemctl restart). ![]() I followed the guidelines of apache 2.4 (i.e. Every time I try to access with a browser, I end up on the page related to domain.io. Options Indexes FollowSymLinks MultiViews Here are my conf files: ĮrrorLog /var/log/apache2/ĬustomLog /var/log/apache2/ combined COMODO Certificate FilesĬOMODO will send you the following certificate files.I am not much of an admin (nor of an native english speaker, for that matter) and I am struggling with a simple task: add a subdomain on Apache 2.4. COMODO will send you the domain verification mail to which you specified email in the CRT file. Download the domain.crt from your server and submit this to SSL provider. I got the positive SSL from, once your SSL certificate order is successful. Root:/home# openssl req -new -key domain.key -out domain.crtĮnter pass phrase for domain.key: Key Password Country Name (2 letter code) : IN // Country Code State or Province Name (full name) : Tamilnadu // State Locality Name (eg, city) : Chennai // City Organization Name (eg, company) : 9lessons Organizational Unit Name (eg, section) : software Common Name (eg, YOUR name) : // Email Address : // Domain Verification Please enter the following 'extra' attributes to be sent with your certificate request A challenge password : SSL Password // No special characters An optional company name : egglabs COMODO Positive SSL ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |