0

I need to create a certificate for my local host

I've created a certificate and copied the certificate in /opt/lamp/ect/ssl.key/sslnewkey.key, /opt/lamp/ect/ssl.crt/sslnewcet.crt.

And added in /opp/lamp/etc/httpd.conf:

LoadModule ssl_module modules/mod_ssl.so

What I do? And Where do I put this:

<VirtualHost *:443>
        DocumentRoot C:/xampp/htdocs/yourProject
        SSLEngine on
        SSLCertificateFile "conf/ssl.crt/server.crt"
        SSLCertificateKeyFile "conf/ssl.key/server.key"
    </VirtualHost>
muru
  • 193,181
  • 53
  • 473
  • 722
stevGates
  • 339
  • 1
  • 4
  • 8
  • 1
    You've used `/opt/lamp/ect` in the first 2 certificate lines, and `/opp/lamp/etc` for the `http.conf` location, hopefully those typos are just on this site, but it's worth checking your file system too. – Arronical Nov 23 '15 at 10:42
  • 3
    Possible duplicate of [When does Ubuntu 16.04 use /etc/apache2/ssl/apache.crt?](https://askubuntu.com/questions/900400/when-does-ubuntu-16-04-use-etc-apache2-ssl-apache-crt) – pa4080 Jan 29 '19 at 18:43

1 Answers1

0

you must change the value of SSLCertificateFile to ssl.crt/server.crt and SSLCertificateKeyFile to ssl.key/server.key. Because relative directory addressing is start from the current folder of config file. also you can change these addresses to absolute type by entering full address.
put this VirtualHost in httpd.conf.

Ghasem Pahlavan
  • 1,805
  • 14
  • 20