Solved

WAMP I've created a virtual host but when I access it the browser is redirected to https and then fails

Posted on 2016-10-27
6
56 Views
Last Modified: 2016-11-17
Hi,

I'm running WAMP on a WIN10 Laptop.

I can access http://localhost and see the default info screen about the WAMPSERVER configuration.

I want to create a virtual host for my dev site.

So, in httpd.conf I've ensured that httpd-vhosts.conf is enabled.

In httpd-vhosts.comf I've added

<VirtualHost *:80>
  ServerName dev_site
  DocumentRoot c:/wamp64/www/dev_site
  <Directory "c:/wamp64/www/dev_site/">
    AllowOverride All
    Require local
  </Directory>
</VirtualHost>

I've restarted WAMP and see dev_site listed as a VirtualHost on http://localhost

I've added an entry in my hosts file for 127.0.0.1   dev_site and tested that a ping to dev_site resolves to the loopback address.

When I navigate to http://dev_site/  I get redirected to https://dev_site/? and Chrome says "This site can't provide a secure connection"

I don't want to redirect to https, I just want to access the virtual host via http.

I created a simple Hello World html file. If I navigate to http://dev_site/a.htm I get redirected to https://dev_site/public/login.htm?loginurl=%2Fa.htm&errormsg=Please%20log%20in%21

Why am I being redirected to https and why am I being sent to a non-existent /public/login.htm file?

There is obviously some config somewhere but I've not (knowingly) done anything other than add the Virtual Host.

Thanks.
0
Comment
Question by:CovertEnigma
  • 3
6 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 41862750
What else do you have installed in that server?  Wordpress perhaps?
0
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 250 total points (awarded by participants)
ID: 41862756
It sounds like the DNS lookup is taking you somewhere else.  Change the name from 'dev_site' to something else to see if the problem changes.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 41862759
0
 
LVL 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 41863812
Hi!

Add these lines to your httpd-vhosts.conf file above the virtualhosts config.
Listen 80
NameVirtualHost *:80

Regards,
    Tomas Helgi
0
 
LVL 43

Accepted Solution

by:
Rob earned 250 total points (awarded by participants)
ID: 41865434
Also for testing purposes, set AllowOverride  to None.  This will prevent redirection

Also what's in your .htacess files in c:/wamp64/www/dev_site,  c:/wamp64/www/, and  c:/wamp64/
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question