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
33 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 42

Accepted Solution

by:
Rob Jurd, EE MVE 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to analyze web traffic logs 10 101
Remote machine, Wampserver - You don't have permission to access / on this server 5 295
PHP Error Settings 12 78
Problem to get function 52 100
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…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

895 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

17 Experts available now in Live!

Get 1:1 Help Now