Comments (16)
docs for windows is wanted.
from mkcert.
I am using xampp portable with apache web server.
Was just writing a long post about how nothing works, checking one step after another, and realized that I did not tell apache to use the certificates issued. I changed virtual host config for a site as shown below, and it started working!
<VirtualHost *:443>
DocumentRoot "D:/xampp/htdocs/test.xyz"
ServerName test.xyz
ServerAlias *.test.xyz
SSLEngine on
SSLCertificateFile "c:\Users\XXX\test.xyz.pem"
SSLCertificateKeyFile "c:\Users\XXX\test.xyz-key.pem"
</VirtualHost>
It is in xampp\apache\conf\extra\httpd-vhosts.conf
in my case for xampp.
Thanks @adamdecaf and @aweber1!
Wildcard for 2nd level domains don't work in Chrome though.
from mkcert.
OK
https & express sever
const https = require('https');
const express = require('express');
const fs = require('fs');
// const fs = require('fs');
// OpenSSL
// const privateKey = fs.readFileSync('./https-ssl/server.key');
// const certificate = fs.readFileSync('./https-ssl/server.crt');
// pem
const privateKey = fs.readFileSync('./ssl/webgeeker.xyz+3-key.pem');
const certificate = fs.readFileSync('./ssl/webgeeker.xyz+3.pem');
const credentials = {
key: privateKey,
cert: certificate,
};
const app = express();
// const app = express.createServer(credentials);
// https://localhost:8888
https.createServer(credentials, app).listen(8888);
app.get('/', function (req, res) {
console.log('req =', req);
res.header('Content-type', 'text/html');
return res.end('<h1>Hello, HTTPS!</h1>');
});
from mkcert.
what's wrong with this ?
C:\Users\xxx\AppData\Local\mkcert
from mkcert.
@xgqfrms, see 1 and 2 in my original post. Real problems start later)
from mkcert.
solution
remame
.exe
& cd to the rightpath
but the * is not work, why?
from mkcert.
Was this problem solved?
from mkcert.
Nope
from mkcert.
What problem are you having? It looks like someone posted a nodejs server. Is your problem related to the certificate in Window's store or your application?
from mkcert.
I tried my best to describe my issue in the original post. Do I need to add something?
from mkcert.
Does the dev server report errors about the certificate files? Can you share the logs and code for the server?
from mkcert.
@ivangretsky you mentioned:
- Launched a local dev server with the test.xyz configured to be served both on http and https.
It's unclear what type of server you're trying to use the certificate with. That will have an impact on both how you generate and how the certificate is used.
That said, if you're using IIS, check out this blog post (shameless plug):
https://medium.com/@aweber01/locally-trusted-development-certificates-with-mkcert-and-iis-e09410d92031
from mkcert.
I am not sure if my problem is related
from mkcert.
I am not sure if my problem is related
i'm dealing with the same issue
from mkcert.
Having the exactly same issue
from mkcert.
OK
https & express sever
const https = require('https'); const express = require('express'); const fs = require('fs'); // const fs = require('fs'); // OpenSSL // const privateKey = fs.readFileSync('./https-ssl/server.key'); // const certificate = fs.readFileSync('./https-ssl/server.crt'); // pem const privateKey = fs.readFileSync('./ssl/webgeeker.xyz+3-key.pem'); const certificate = fs.readFileSync('./ssl/webgeeker.xyz+3.pem'); const credentials = { key: privateKey, cert: certificate, }; const app = express(); // const app = express.createServer(credentials); // https://localhost:8888 https.createServer(credentials, app).listen(8888); app.get('/', function (req, res) { console.log('req =', req); res.header('Content-type', 'text/html'); return res.end('<h1>Hello, HTTPS!</h1>'); });
Works absolutely great for me!
from mkcert.
Related Issues (20)
- Recognize custom Firefox profile locations HOT 3
- Certificate is generated with a wrong DateTime HOT 1
- Linux brew command is wrong in documentation HOT 1
- For anyone who facing this issue, the steps to use mkcert in the WSL2 to be trusted by window side:
- Module path should be canonical HOT 2
- Installing in Firefox (...) failed on Fedora 37 HOT 1
- X509v3 Subject Alternative Name must be critical
- 404 when downloading latest release from GH HOT 2
- MKcert unable to install system root Mac M2 Ventura
- Not working if using docker container
- CVE issues in go stdlib of mkcert HOT 9
- Is this project still being maintained? HOT 3
- Mkcert Certificates causes flutter cli tools to throw tls error HOT 3
- Root CA not added to certlm.msc(Local Machine Cert), just added to certmgr.msc(Current User Cert) HOT 1
- I am having trouble configuring this on windows 10 environment, any other tips beside the documentation?
- Basic commands don't work on macOS after brew install (mkcert -install, -CAROOT responds with "unknown option") HOT 4
- Certutil process is continuously running and not returning when creating new NSS DB HOT 1
- Segmentation fault when attempting mkcert -install (mkcert installed by brew), mkcert intalled via apt-get works - 1.4.3, 1.4.4 HOT 2
- Node unable to verify the first certificate error HOT 2
- Why is it impossible to remove this library and remove the rootCA-key.pem?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mkcert.