32 lines
958 B
JavaScript
32 lines
958 B
JavaScript
/* 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
|