This commit is contained in:
metacryst
2025-04-08 11:53:18 -05:00
commit 5ba9bae02c
14 changed files with 351 additions and 0 deletions

32
ssl/index.js Normal file
View File

@@ -0,0 +1,32 @@
/* 1. Shut down Admin and run this file 'npm run start' */
/* 2. Run this command */
// sudo certbot certonly \
// --dns-route53 \
// -d '*.parchment.page' \
// -d quill.sun.museum \
// -d admin.sun.museum \
// -d scraper.sun.museum \
// -d ai.sun.museum \
// -d america.sun.museum
import http from 'http';
import httpProxy from 'http-proxy';
const proxy = httpProxy.createProxyServer({});
const server = http.createServer((req, res) => {
// Forward all requests from port 3000 to port 80
proxy.web(req, res, { target: 'http://localhost:80' });
});
server.listen(3000, () => {
console.log('Proxy server is running on port 3000 and forwarding requests to port 80');
});
/* 2024-12-30 Notes*/
// Switched to AWS certification so Parchment Users can have wildcard domains (*.parchment.page)
// AWS must now be used for all domains
// pip3 install certbot-dns-route53
// https://chatgpt.com/c/66fc4450-a570-8005-a177-1d1eb6c738e8

58
ssl/package-lock.json generated Normal file
View File

@@ -0,0 +1,58 @@
{
"name": "ssl",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "ssl",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"http-proxy": "^1.18.1"
}
},
"node_modules/eventemitter3": {
"version": "4.0.7",
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
"integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="
},
"node_modules/follow-redirects": {
"version": "1.15.9",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz",
"integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==",
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/RubenVerborgh"
}
],
"engines": {
"node": ">=4.0"
},
"peerDependenciesMeta": {
"debug": {
"optional": true
}
}
},
"node_modules/http-proxy": {
"version": "1.18.1",
"resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz",
"integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
"dependencies": {
"eventemitter3": "^4.0.0",
"follow-redirects": "^1.0.0",
"requires-port": "^1.0.0"
},
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/requires-port": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
"integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ=="
}
}
}

16
ssl/package.json Normal file
View File

@@ -0,0 +1,16 @@
{
"name": "ssl",
"version": "1.0.0",
"type": "module",
"description": "",
"main": "index.js",
"scripts": {
"start": "node index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"http-proxy": "^1.18.1"
}
}