how to allow a web page not to use https in apache

1

I am currently using CentOS7.

I have configured apache2 to use SSL and everything works perfectly, the problem is that I need a directory that contains a web page that does not use SSL (http).

I tried to configure a virtual host but it did not work, and following several guides I tried to install webmin, but I could not start it because it said that LSB could not be started.

BinaryMan001

Posted 2020-02-29T11:31:56.253

Reputation: 28

Answers

1

It is possible to provide HTTP and HTTPS from the same server, as HTTP and HTTPS use different server ports (HTTP on port 80, HTTPS on port 443), so there is no conflict.

You can either run two separate server instances bound to these ports, or better use virtual hosting to create two virtual servers, both served by the same instance of Apache, where one responds over HTTP to requests on port 80 and the other over HTTPS on port 443.

Something like:

<VirtualHost *:80>
        include /etc/apache2/vhost.conf.d/site1
</VirtualHost>

<VirtualHost *:443>
        include /etc/apache2/vhost.conf.d/site2
</VirtualHost>

For more information see Apache Virtual Host documentation.

harrymc

Posted 2020-02-29T11:31:56.253

Reputation: 306 093