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
23 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 82

Expert Comment

by:Dave Baldwin
Comment Utility
What else do you have installed in that server?  Wordpress perhaps?
0
 
LVL 82

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 250 total points (awarded by participants)
Comment Utility
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 82

Expert Comment

by:Dave Baldwin
Comment Utility
0
 
LVL 24

Expert Comment

by:Tomas Helgi Johannsson
Comment Utility
Hi!

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

Regards,
    Tomas Helgi
0
 
LVL 42

Accepted Solution

by:
Rob Jurd, EE MVE earned 250 total points (awarded by participants)
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now