Apache HTTP Server
To run the Axidian CertiFlow server components on Linux, configure the Apache web server as a reverse proxy server.
- Install Apache.
- Install a TLS/SSL certificate.
- Configure the modules.
- Configure the Apache website.
Follow the instructions for the operating system of the workstation where you plan to install Apache.
- RHEL-based
- Debian-based
Install Apache
Install the Apache web server using the following commands.
sudo yum install httpd
sudo systemctl enable httpd
sudo systemctl start httpd
Alternatively, install the Apache web server from source. For more information, see the Apache website.
Install a TLS/SSL certificate
How to issue a TLS/SSL certificate
Install a TLS/SSL certificate on the web server.
- Copy the certificate and private key files to the catalogs specified in the Apache configuration file.
sudo mkdir /etc/ssl/private/
sudo cp ./SSL.crt /etc/httpd/ssl/certs
sudo cp ./SSL.key /etc/httpd/ssl/private - Add the root CA certificate to the trusted certificates store on the workstation running Apache.
sudo cp root-ca.crt /usr/local/share/ca-certificates/
sudo update-ca-certificates -f - Make the certificate trusted across the domain. For example, distribute it through Group Policies.
Install modules and edit configuration
Install the mod_ssl module.
sudo yum install -y mod_sslAdd the following directives to the httpd.conf configuration file (default location: /etc/httpd/conf/httpd.conf).
Listen 3003
LimitRequestLine 16384
LimitRequestFieldSize 16384
ServerName SERVER_FQDN
Header append X-FRAME-OPTIONS "SAMEORIGIN"
Header set X-Content-Type-Options "nosniff"In this and the following sections, replace SERVER_FQDN with the hostname (FQDN) of your server.
Configure the Apache website
Configure Apache to accept web requests and proxy them to the Axidian CertiFlow service.
Create the website configuration file /etc/httpd/conf.d/SERVER_FQDN.conf.
sudo touch /etc/httpd/conf.d/SERVER_FQDN.confPopulate the file with the recommended content.
cautionThe
SSLCertificateFileandSSLCertificateKeyFileparameters contain the paths to the certificate and private key files created or imported in the previous steps. Verify the specified paths and filenames.
Recommended content for the SERVER_FQDN.conf file
<VirtualHost *:80>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}/$1 [R=301,L]
</VirtualHost>
<VirtualHost *:443>
Protocols h2 http/1.1
SSLCertificateFile /etc/httpd/ssl/certs/SSL.crt
SSLCertificateKeyFile /etc/httpd/ssl/private/SSL.key
SSLCipherSuite @SECLEVEL=1:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
ErrorLog logs/error.log
CustomLog logs/access.log combined
SSLEngine on
SSLProtocol -all +TLSv1.2
SSLHonorCipherOrder off
SSLCompression off
SSLSessionTickets on
SSLUseStapling off
SSLProxyEngine on
SetEnv nokeepalive ssl-unclean-shutdown
RequestHeader set X-Forwarded-Proto https
Header always set Strict-Transport-Security "max-age=63072000"
ProxyPreserveHost On
ProxyPass /certiflow/mc http://localhost:5001/certiflow/mc
ProxyPassReverse /certiflow/mc http://localhost:5001/certiflow/mc
ProxyPass /certiflow/ss http://localhost:5002/certiflow/ss
ProxyPassReverse /certiflow/ss http://localhost:5002/certiflow/ss
ProxyPass /certiflow/rss http://localhost:5003/certiflow/rss
ProxyPassReverse /certiflow/rss http://localhost:5003/certiflow/rss
ProxyPass /certiflow/api http://localhost:5004/certiflow/api
ProxyPassReverse /certiflow/api http://localhost:5004/certiflow/api
ProxyPass /certiflow/credprovapi http://localhost:5005/certiflow/credprovapi
ProxyPassReverse /certiflow/credprovapi http://localhost:5005/certiflow/credprovapi
ProxyPass /certiflow/oidc http://localhost:5008/certiflow/oidc
ProxyPassReverse /certiflow/oidc http://localhost:5008/certiflow/oidc
ProxyPass /certiflow/wizard http://localhost:5009/certiflow/wizard
ProxyPassReverse /certiflow/wizard http://localhost:5009/certiflow/wizard
#ProxyPass /api http://localhost:5010/api
#ProxyPassReverse /api http://localhost:5010/api
</VirtualHost>
<VirtualHost *:3003>
protocols h2 http/1.1
SSLCertificateFile /etc/httpd/ssl/certs/SSL.crt
SSLCertificateKeyFile /etc/httpd/ssl/private/SSL.key
SSLCipherSuite @SECLEVEL=1:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLProtocol -all +TLSv1.2
SSLHonorCipherOrder off
SSLCompression off
SSLSessionTickets on
SSLUseStapling off
SSLProxyEngine on
RequestHeader set X-Forwarded-Proto https
Header always set Strict-Transport-Security "max-age=63072000"
ProxyPass /agentregistrationapi http://localhost:5006/agentregistrationapi
ProxyPassReverse /agentregistrationapi http://localhost:5006/agentregistrationapi
<Location "/agentserviceapi">
SSLVerifyClient optional_no_ca
SSLOptions +ExportCertData
RequestHeader unset x-ssl-client-cert
RequestHeader set x-ssl-client-cert "expr=%{escape:%{SSL_CLIENT_CERT}}"
#RequestHeader set x-ssl-client-cert "expr=%{escape:%{SSL_CLIENT_S_DN}}"
ProxyPass http://localhost:5007/agentserviceapi
ProxyPassReverse http://localhost:5007/agentserviceapi
</Location>
</VirtualHost>
Reload the configuration file.
sudo httpd -t
sudo systemctl restart httpd
Install Apache
Install the Apache web server using the following commands.
sudo apt install apache2
sudo systemctl enable apache2
sudo service apache2 start
Alternatively, install the Apache web server from source. For more information, see the Apache website.
Install a TLS/SSL certificate
How to issue a TLS/SSL certificate
Install a TLS/SSL certificate on the web server.
- Copy the certificate and private key files to the catalogs specified in the Apache configuration file.
sudo cp ./SSL.crt /etc/ssl/certs
sudo cp ./SSL.key /etc/ssl/private - Add the root CA certificate to the trusted certificates store on the workstation running Apache.
sudo cp root-ca.crt /usr/local/share/ca-certificates/
sudo update-ca-certificates -f - Make the certificate trusted across the domain. For example, distribute it through Group Policies.
Install modules and edit configuration
Apache consists of a core server with module components that can be loaded to extend its functionality as required.
Install the following modules.
sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2enmod ssl
sudo a2enmod headers
sudo a2enmod rewrite
sudo systemctl restart apache2Add the following directives to the apache2.conf configuration file (default location: /etc/apache2/apache2.conf).
Listen 3003
LimitRequestLine 16384
LimitRequestFieldSize 16384
ServerName SERVER_FQDN
Header append X-FRAME-OPTIONS "SAMEORIGIN"
Header set X-Content-Type-Options "nosniff"In this and the following sections, replace SERVER_FQDN with the hostname (FQDN) of your server.
Configure the Apache website
Configure Apache to accept web requests and proxy them to the Axidian CertiFlow service.
Create the website configuration file /etc/apache2/sites-available/SERVER_FQDN.conf.
sudo touch /etc/apache2/sites-available/SERVER_FQDN.confPopulate the file with the recommended content.
cautionThe
SSLCertificateFileandSSLCertificateKeyFileparameters contain the paths to the certificate and private key files created or imported in the previous steps. Verify the specified paths and filenames.
Recommended content for the SERVER_FQDN.conf file
<VirtualHost *:80>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}/$1 [R=301,L]
</VirtualHost>
<VirtualHost *:443>
Protocols h2 http/1.1
SSLCertificateFile /etc/ssl/certs/SSL.crt
SSLCertificateKeyFile /etc/ssl/private/SSL.key
SSLCipherSuite @SECLEVEL=1:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLProtocol -all +TLSv1.2
SSLHonorCipherOrder off
SSLCompression off
SSLSessionTickets on
SSLUseStapling off
SSLProxyEngine on
SetEnv nokeepalive ssl-unclean-shutdown
RequestHeader set X-Forwarded-Proto https
Header always set Strict-Transport-Security "max-age=63072000"
ProxyPreserveHost On
ProxyPass /certiflow/mc http://localhost:5001/certiflow/mc
ProxyPassReverse /certiflow/mc http://localhost:5001/certiflow/mc
ProxyPass /certiflow/ss http://localhost:5002/certiflow/ss
ProxyPassReverse /certiflow/ss http://localhost:5002/certiflow/ss
ProxyPass /certiflow/rss http://localhost:5003/certiflow/rss
ProxyPassReverse /certiflow/rss http://localhost:5003/certiflow/rss
ProxyPass /certiflow/api http://localhost:5004/certiflow/api
ProxyPassReverse /certiflow/api http://localhost:5004/certiflow/api
ProxyPass /certiflow/credprovapi http://localhost:5005/certiflow/credprovapi
ProxyPassReverse /certiflow/credprovapi http://localhost:5005/certiflow/credprovapi
ProxyPass /certiflow/oidc http://localhost:5008/certiflow/oidc
ProxyPassReverse /certiflow/oidc http://localhost:5008/certiflow/oidc
ProxyPass /certiflow/wizard http://localhost:5009/certiflow/wizard
ProxyPassReverse /certiflow/wizard http://localhost:5009/certiflow/wizard
#ProxyPass /api http://localhost:5010/api
#ProxyPassReverse /api http://localhost:5010/api
</VirtualHost>
<VirtualHost *:3003>
protocols h2 http/1.1
SSLCertificateFile /etc/ssl/certs/SSL.crt
SSLCertificateKeyFile /etc/ssl/private/SSL.key
SSLCipherSuite @SECLEVEL=1:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLProtocol -all +TLSv1.2
SSLHonorCipherOrder off
SSLCompression off
SSLSessionTickets on
SSLUseStapling off
SSLProxyEngine on
RequestHeader set X-Forwarded-Proto https
Header always set Strict-Transport-Security "max-age=63072000"
ProxyPass /agentregistrationapi http://localhost:5006/agentregistrationapi
ProxyPassReverse /agentregistrationapi http://localhost:5006/agentregistrationapi
<Location "/agentserviceapi">
SSLVerifyClient optional_no_ca
SSLOptions +ExportCertData
RequestHeader unset x-ssl-client-cert
RequestHeader set x-ssl-client-cert "expr=%{escape:%{SSL_CLIENT_CERT}}"
#RequestHeader set x-ssl-client-cert "expr=%{escape:%{SSL_CLIENT_S_DN}}"
ProxyPass http://localhost:5007/agentserviceapi
ProxyPassReverse http://localhost:5007/agentserviceapi
</Location>
</VirtualHost>
Reload the configuration.
sudo a2ensite SERVER_FQDN
sudo apachectl configtest
sudo systemctl restart apache2