Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
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
?
88 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses
Course of the Month10 days, 14 hours left to enroll

618 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