title: giving SSL certificate for virtual host laravel
body: <p>I have a project I want to work as a frontend dev and the backend in laravel <br />
  everything is fine I'll start work, but when I access any page on the website, the links (such as image, css, js etc links) is HTTPS, but the link in my machine is HTTP, so I most have SSL to run the project</p>
  <p><strong>I tried vhost</strong> :</p>
  <pre><code>&lt;VirtualHost *:8000&gt;
      DocumentRoot &quot;C:/xampp/htdocs/bm/public&quot;
      ServerName business.example.lc:8000
      ServerAdmin admin@example.com 
  
      #   SSL Engine Switch: Enable/Disable SSL for this virtual host.
  
      SSLEngine on    
      SSLCertificateFile    &quot;C:/xampp/apache/conf/ssl.crt/server.crt&quot;
      SSLCertificateKeyFile &quot;C:/xampp/apache/conf/ssl.key/server.key&quot;
    
      &lt;Directory &quot;C:/xampp/htdocs/bm/public&quot;&gt;
          #SSLOptions +Indexes +Includes +FollowSymLinks +MultiViews
          AllowOverride All
          Require all granted
      &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  
  &lt;VirtualHost *:443&gt;
      DocumentRoot &quot;C:/xampp/htdocs/bm/public&quot;
      ServerName business.example.lc:443
      ServerAdmin admin@example.com 
  
      #   SSL Engine Switch: Enable/Disable SSL for this virtual host.
  
      SSLEngine on    
      SSLCertificateFile    &quot;C:/xampp/apache/conf/ssl.crt/server.crt&quot;
      SSLCertificateKeyFile &quot;C:/xampp/apache/conf/ssl.key/server.key&quot;
    
      &lt;Directory &quot;C:/xampp/htdocs/bm/public&quot;&gt;
          #SSLOptions +Indexes +Includes +FollowSymLinks +MultiViews
          AllowOverride All
          Require all granted
      &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  
  </code></pre>
  <p>and the <strong>hosts</strong> file</p>
  <pre><code>127.0.0.1:8000          business.example.lc
  </code></pre>
  <p>but it views me 404 when I access to <code>https://business.example.lc/</code> it only works on <code>http://business.example.lc/</code></p>
  <p>I also tried :</p>
  <pre><code>&gt; C://xampp/htdocs/bm&gt; makecert.bat
  </code></pre>
  <p>but here when I submit, it requires a password :</p>
  <pre><code>Enter PEM pass phrase:
  Verifying - Enter PEM pass phrase:
  </code></pre>
  <p>returns :</p>
  <pre><code>C:\xampp\apache&gt;makecert.bat
  Generating a RSA private key
  ..........+++++
  ....................................................................................................+++++
  writing new private key to 'privkey.pem'
  Enter PEM pass phrase:
  Verifying - Enter PEM pass phrase:
  Verify failure
  7920:error:2807106B:UI routines:UI_process:processing error:crypto\ui\ui_lib.c:545:while reading strings
  7920:error:0906406D:PEM routines:PEM_def_callback:problems getting password:crypto\pem\pem_lib.c:59:
  7920:error:0907E06F:PEM routines:do_pk8pkey:read key:crypto\pem\pem_pk8.c:83:
  unable to load Private Key
  5656:error:0909006C:PEM routines:get_name:no start line:crypto\pem\pem_lib.c:745:Expecting: ANY PRIVATE KEY
  Can't open server.csr for reading, No such file or directory
  8304:error:02001002:system library:fopen:No such file or directory:crypto\bio\bss_file.c:69:fopen('server.csr','r')
  8304:error:2006D080:BIO routines:BIO_new_file:no such file:crypto\bio\bss_file.c:76:
  Could Not Find C:\xampp\apache\.rnd
  Could Not Find C:\xampp\apache\server.csr
  The system cannot find the file specified.
  The system cannot find the file specified.
  
  -----
  Das Zertifikat wurde erstellt.
  The certificate was provided.
  
  Press any key to continue . . .
  </code></pre>