Answer the question
In order to leave comments, you need to log in
How to create https?
I have generated an ssl certificate and I am trying to connect the certificate to apache but it does not work, I tried to connect via http-ssl.conf
Answer the question
In order to leave comments, you need to log in
In the sites-available folder, create a file with a virtual host config (or add the following directives to an existing config):
<IfModule mod_ssl.c>
<VirtualHost example.com:443>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName example.com
ServerAdmin [email protected]
DocumentRoot /var/www/example.com
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/example.com-error.log
CustomLog ${APACHE_LOG_DIR}/example.com-access.log combined
# SSL Engine Switch:
# Enable/Disable SSL for this virtual host.
SSLEngine on
SSLProtocol all -SSLv2
ServerSignature On
SSLCertificateFile /etc/apache2/ssl/example.com.crt
SSLCertificateKeyFile /etc/apache2/ssl/example.com.private.key
SSLCertificateChainFile /etc/apache2/ssl/root_bundle.crt
</VirtualHost>
</IfModule>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question