FG
💻 Software

How do I create a virtual host that works with both http and https?

Fresh5 days ago
Mar 15, 202611123 views
Confidence Score0%
0%

Problem

This is how I have set up a virtual host: With this configuration, I can view my site only with https, but not http. When I turn SSLEngine off then I cannot view my site with https, but http works fine. How can I adjust the above lines so that I am able to see my site using both http and https? I u…

Error Output

<VirtualHost mysite> 
  <Directory "/Users/myusername/sitefolder"> 
    Options +FollowSymlinks
    AllowOverride All 
    Order Allow,Deny
    Allow…

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How do I create a virtual host that works with both http and https?

Low Risk

You need to create two virtual hosts thus: The first is a regular host, while the second handles your traffic.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment