WAMP - vhost address forced to HTTPS instead of just HTTP

Viewed 18

I have installed wamp64. configured various vhosts which work well except for one address which the system forces to go to HTTPS instead of HTTP like the rest of them. dev.test.com is forced to go to HTTPS://dev.test.com instead of HTTP://dev.test.com and of course the file is not found.

dev.test2.com goes to HTTP,

example goes to HTTP

I had a XAMPP install that had a vhosts file which had a redirect for dev.test.com to HTTPS. Thinking this might somehow interfere, I renamed that XAMPP vhost file, but I still get the same problem even after a computer reboot.

In wamp64 I am able to create any other vhost and have it work fine, but not this one. What could be causing this?

wamp64, version 3.2.9, php 7.4, apache 2.4.51

WAMP VHOST FILE:

    <VirtualHost *:80>
        ServerName example
        DocumentRoot "c:/wamp64/www/example"
        <Directory  "c:/wamp64/www/example/">
            Options +Indexes +Includes +FollowSymLinks +MultiViews
            AllowOverride All
            Require local
        </Directory>
    </VirtualHost>
    #
    <VirtualHost *:80>
        ServerName dev.test.com
        DocumentRoot "c:/wamp64/www/dev.test.com"
        <Directory  "c:/wamp64/www/dev.test.com/">
            Options +Indexes +Includes +FollowSymLinks +MultiViews
            AllowOverride All
            Require local
        </Directory>
    </VirtualHost>
    #
    <VirtualHost *:80>
        ServerName dev.test2.com
        DocumentRoot "c:/wamp64/www/dev.test2.com"
        <Directory  "c:/wamp64/www/dev.test2.com/">
            Options +Indexes +Includes +FollowSymLinks +MultiViews
            AllowOverride All
            Require local
        </Directory>
    </VirtualHost>
    #

My previous XAMPP VHOST FILE - NOW RENAMED TO DISABLE IT (httpd-vhosts_old.conf)

<VirtualHost dev.test.com:80>
    ServerName dev.test.com
    DocumentRoot "C:\xampp\htdocs\dev.test.com"
    <Directory "C:\xampp\htdocs\dev.test.com">
        Options All
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog "logs/dev.test.com-error.log"
    CustomLog "dev.test.com-access.log" combined

    #redirect non SSL URI to SSL URI
    RewriteEngine on
    RewriteCond %{SERVER_NAME} =www.dev.test.com [OR]
    RewriteCond %{SERVER_NAME} =dev.test.com
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
0 Answers
Related