Page 1 of 1

Access virtualhost always redirect to https, dashboard

PostPosted: 09. April 2020 05:35
by silentIm
I set up virtualhost site for my development machine, moving from my macbook pro to new Windows machine. The problem is Apache always redirects to https, even if I disable httpd-ssl.conf in httpd.conf. If I enable httpd-ssl.conf, it redirects to xampp /dashboard (with SSL error because it still uses default certificate).

I have searched google for all possible solutions but Apache still redirect to /dashboard. Please help me, I am stumped.

my hosts file
Code: Select all
127.0.0.1       artha.test www.artha.test


httpd-vhosts.conf
Code: Select all
<VirtualHost *:80>
    ServerAdmin firmanazis@gmail.com
    DocumentRoot "C:/xampp/htdocs"
    ServerName localhost
    LogLevel debug
    ErrorLog "logs/localhost-error.log"
    CustomLog "logs/localhost-access.log" common   
</VirtualHost>

<Directory "C:\xampp\xampp-sites\artha">
   Options Indexes FollowSymLinks
   AllowOverride All
   Require all granted
</Directory>
<VirtualHost *:80>
    ServerAdmin firmanazis@gmail.com
    DocumentRoot "C:\xampp\xampp-sites\artha"
    ServerName artha.test
    ServerAlias www.artha.test
    LogLevel debug
    ErrorLog "logs/artha.test-error.log"
    CustomLog "logs/artha.test-access.log" common
</VirtualHost>

Re: Access virtualhost always redirect to https, dashboard

PostPosted: 09. April 2020 06:58
by Altrea
XAMPP comes with a index.php file in the htdocs directory which fires the redirect.

Re: Access virtualhost always redirect to https, dashboard

PostPosted: 09. April 2020 09:34
by silentIm
Okay, my mistake. I forget in my app contains .hataccess that rewrite http to https. It works now.

Also I just notice that httpd.conf file path should use slash (/) sign for directory separator, even on Windows.