Enable HTTPS

Enable HTTPS

Linux

Ubuntu part

The first step is to create HTTPS credentials

and install openssl

apt-get install openssl 

Create

ssl folder``` cd /etc/apache2/ mkdir ssl

Create credentials``` 
openssl 
req -new -x509 -days 365 -nodes -out /etc/apache2/ssl/apache.pem -keyout /etc/apache2/ssl/apache.key 

The second step is to modify django.conf

cd /etc/apache2/sites- available/ 
vi django.conf 

Add the following code``` SSLEngine On SSLCertificateFile /etc/apache2/ssl/apache.pem SSLCertificateKeyFile /etc/apache2/ssl/apache.key

**Port : \* :80 changed to \*:443** 
![](https://syscomgo.com/wp-content/uploads/2023/11/OMFLOW_3-7_2.png) 
Modify django.conf Example 
#### The third step , modify settings.py 
> file path: `/opt/omflow/server/omflow/settings.py` 
`` 
LOCAL_PROTOCOL = "http" 
changed to 
LOCAL_PROTOCOL = "https" 
`` 
#### The fourth step, enable SSL module, restart the service 

a2enmod ssl systemctl restart omflow_server

#### The fifth step, check the OMFLOW web page, 
please enter **https://\<SERVER IP>:443/** 
to confirm that the OMFLOW web page is normal 
### Centos part 
#### The first step is to create HTTPS credentials 
and install openssl 

yum install openssl

Create credentials``` 
mkdir 
/etc/ssl/omcerts 
openssl req -new -x509 -sha256 -days 365 -nodes -out /etc/ssl/omcerts/apache.pem -keyout /etc/ssl/omcerts/apache.key 

Install mod_ssl

yum install mod_ssl 

The second step, Modify httpd.conf

File path: /etc/httpd/conf/httpd.conf Note the original listening IP and add https Port: `` `

Change this to Listen on specific IP addresses as shown below to

prevent Apache from glomming onto all bound IP addresses.

#Listen 12.34.56.78:80 #Listen 80 Listen 443

#### The third step is to modify django.conf 

cd /etc/httpd/conf.d / vi django.conf

Add the following code and change \<IP>:443 

WSGIPassAuthorization On WSGIDaemonProcess omflow python-path=/opt/omflow/server:/opt/omflow/python/lib/python3 . 6/site-packages WSGIProcessGroup omflow WSGIScriptAlias ​​/ /opt/omflow/server/omflow/wsgi.py <VirtualHost :443>

    Alias ​​/static /opt/omflow/server/staticfiles 
    <Directory /opt/omflow/server/staticfiles> 
            Require all granted 
    </Directory> 

    <Directory /opt/omflow/server/omflow> 
            <Files wsgi.py> 
                    Require all granted 
            < /Files> 
    </Directory> 
    SSLEngine on 
    SSLCertificateFile /etc/ssl/localcerts/apache.pem 
    SSLCertificateKeyFile /etc/ssl/localcerts/apache.key 

Modify django.conf Example 

> conf. ssl.conf may appear under the d folder, please remember to rename it 

! [](https://syscomgo.com/wp-content/uploads/2023/11/OMFLOW_3-7_3.png) 

#### Fourth Steps, modify settings.py 

> file path: `/opt/omflow/server/omflow/settings.py` 

`` 
LOCAL_PROTOCOL = "http" 
changed to 
LOCAL_PROTOCOL = "https" 
`` 

#### The fifth step, Restart the service 

systemctl stop omflow_server systemctl start omflow_server


#### The sixth step, check the OMFLOW web page, 

please enter **https://\<SERVER IP>:443/** 

to confirm that the OMFLOW web page is normal 

## Windows 

### The first step is to modify httpd.conf 

> file path: `C:\Program Files\OMFLOW Server\Apache24\conf\httpd.conf` 

and note the original listening IP: 

Listen: Allows you to bind Apache to specific IP addresses and/or

ports, instead of the default. See also the

directive.

Change this to Listen on specific IP addresses as shown below to

prevent Apache from glomming onto all bound IP addresses .

#Listen 12.34.56.78:80 Listen :80Add

at the beginning of line 9 above

#Listen :80


enable ssl profile``` 

# 
Secure (SSL/ TLS) connections 
# Note: The following must be present to support 
# starting without SSL on platforms with no /dev/random equivalent 
# but a statically compiled-in mod_ssl. 
# 
<IfModule ssl_module> 
#Include conf/extra/httpd-ssl .conf 
#Include conf/extra/httpd-ahssl.conf 
#SSLRandomSeed startup builtin 
#SSLRandomSeed connect builtin 
</IfModule> 


Remove the # in line 7 aboveInclude 
conf/extra/httpd-ssl.conf 

The second step is to modify httpd-ssl.conf

file path: C:\Program Files\OMFLOW Server\Apache24\conf\extra\httpd-ssl.confAdd

new listening IP-1:

# When we also provide SSL we have to listen to the 
# standard HTTP port (see above) and to the HTTPS port 
#
# Note: Configurations that use IPv6 but not IPv4-mapped addresses need two 
# Listen directives: "Listen [::]:443" and "Listen 0.0.0.0:443" 
# 
Listen <IP>:443 

New listening IP-2:

## 
## SSL Virtual Host Context 
## 

<VirtualHost <IP>:443> 

# General setup for the virtual host 
DocumentRoot "${SRVROOT}/htdocs" 
ServerName <IP>:443 
ServerAdmin admin@ example.com 
ErrorLog "${SRVROOT}/logs/error.log" 
TransferLog "${SRVROOT}/logs/access.log" 

Add certificate path:

# Server Certificate: 
# Point SSLCertificateFile at a PEM encoded certificate. If 
# the certificate is encrypted, then you will be prompted for a 
# pass phrase. Note that a kill -HUP will prompt again. Keep 
# in mind that if you have both an RSA and a DSA certificate you 
# can configure both in parallel (to also allow the use of DSA 
# ciphers, etc.) 
# Some ECC cipher suites (http://www.ietf.org/rfc/rfc4492.txt) 
# require an ECC certificate which can also be configured in 
# parallel. 
SSLCertificateFile "C:\Program Files\OMFLOW Server\cert\cer\server.cer" 
#SSLCertificateFile "${SRVROOT}/conf/server-dsa.crt" 
#SSLCertificateFile "${SRVROOT}/conf/server- ecc.crt" 

# Server Private Key: 
# If the key is not combined with the certificate, use this 
# directive to point at the key file. Keep in mind that if 
# you've both a RSA and a DSA private key you can configure 
# both in parallel (to also allow the use of DSA ciphers, etc.) 
# ECC keys, when in use, can also be configured in parallel 
SSLCertificateKeyFile "C:\Program Files\OMFLOW Server\cert\pfx\server.key " 
#SSLCertificateKeyFile "${SRVROOT}/conf/server-dsa.key" 
#SSLCertificateKeyFile "${SRVROOT}/conf/server-ecc.key" 
SSLCertificateChainFile "C:\Program Files\OMFLOW Server\cert\cer\uca. cer" 
``` 

> Certificate path   
> server.cer, server.key, uca.cer and other three files   
> Please fill in according to the actual situation. 

### The third step is to modify settings.py 

> File path: `C:\Program Files\OMFLOW Server\omflow\omflow\settings.py` 

``` 
LOCAL_PROTOCOL = "http" 
changed to 
LOCAL_PROTOCOL = "https" 
`` ` 

### The fourth step is to restart the service. 

Open the service list, find the OMFLOW Server and restart the service. 

After the service restart is completed, confirm whether the change was successful.

Last updated