?
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
Medium Priority
?
75 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
6 Comments
 
LVL 84

Expert Comment

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

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 1000 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 84

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 1000 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

Optimum High-Definition Video Viewing and Control

The ATEN VM0404HA 4x4 4K HDMI Matrix Switch supports 4K resolutions of UHD (3840 x 2160) and DCI (4096 x 2160) with refresh rates of 30 Hz (4:4:4) and 60 Hz (4:2:0). It is ideal for applications where the routing of 4K digital signals is required.

Question has a verified solution.

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

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…
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month9 days, 19 hours left to enroll

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