0

I have one apache server with one SSL-certificate installed, and I set up these virtualhosts in the httpd.conf

<VirtualHost *:80> ServerName subdomanin.DOMAIN_A.com DocumentRoot "/var/www/html/XXXXXXXXXXXXXXXXXXXXXXXX" </VirtualHost> <VirtualHost *:443> ServerName DOMAIN_A.com DocumentRoot "/var/www/html/XXXXXXXXXXXXXXXXXXXXXXXX" SSLEngine on SSLCertificateKeyFile XXXXXXXXXXXXXXXXXXXXXXXX SSLCertificateFile XXXXXXXXXXXXXXXXXXXXXXXX SSLCertificateChainFile XXXXXXXXXXXXXXXXXXXXXXXX </VirtualHost> 

Everytime I try to reach http://subdomain.DOMAIN_A.com with my browser, it redirects me to port 443, with https before the address. The certificate doesn't work with the subdomain and I receive an error.

I don't understand how to access the subdomain on port 80 by default and not be redirected on port 443.

8
  • There is no reason for the described redirection in this configuration. So probably the reason lies somewhere else, most likely in some application logic or in some dynamic configuration file. Commented Oct 30, 2017 at 16:16
  • in that subdomain there is jus an index.php file without some dynamic configuration. Commented Oct 30, 2017 at 16:19
  • Dynamic configuration files are hidden, typically... Commented Oct 30, 2017 at 16:38
  • there is an empty folder. nothing more Commented Oct 30, 2017 at 16:53
  • You do know what a dynamic configuration file is and how to check if there is a hidden file? Not trying to annoy you, but you do not really answer in a direct way... Commented Oct 30, 2017 at 16:55

2 Answers 2

1

Kindly confirm whether there is any virtual host entry of subdomanin.DOMAIN_A.com in SSL.conf
If there is any then you have to remove it and restart the services

Sign up to request clarification or add additional context in comments.

1 Comment

To be specific you need to check rewrite entry in the virtual host 80
0

You can test the following:

1- Try to set different documentRoot

2- Restart apache2

3- Clear browsing cache

4- Look at apache log file if there is any error

9 Comments

one last thing is to check your dns configuration, make sure subdomanin.DOMAIN_A.com and DOMAIN_A.com have the same A record (server ip), I noticed you put sudomanin.... maybe in your dns config you have subdomain.??
Yes they have the same ip
subdomain and subdomanin are different maybe you set subdomain in your DNS config and subdomanin in virtual host ?
i try with another domain and it works on http . if i reput the domainA restart https...
I think you should clear dns cache in your system, if your are using windows, run command prompt as administrator, and Run the following command: ipconfig /flushdns
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.