add static generation script
This commit is contained in:
parent
7a57caed2c
commit
1d08b01501
@ -1,57 +1,81 @@
|
||||
|
||||
export const LXCcontainerLocalIP = '10.10.10.103'
|
||||
export const LXCcontainerProtocol = 'https'
|
||||
|
||||
export
|
||||
const domainsConfig = [{
|
||||
export const listing = {
|
||||
'com': {
|
||||
'cipherbliss': [
|
||||
'portfolio',
|
||||
'www',
|
||||
'framadate-api'
|
||||
]
|
||||
},
|
||||
'fr': {
|
||||
'tykayn': ['']
|
||||
},
|
||||
'art': {
|
||||
'clairelemoine': ['www']
|
||||
},
|
||||
}
|
||||
export let baseDomain = {
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'le nom du domaine',
|
||||
domain: '',
|
||||
framework: 'static',
|
||||
|
||||
letsEncryptNumber: '-001',
|
||||
}
|
||||
export const domainsConfig = [{
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'Blog cipherbliss',
|
||||
domain: 'www.cipherbliss.com',
|
||||
framework: 'wordpress',
|
||||
disableSSL: false,
|
||||
},{
|
||||
|
||||
}, {
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'Portfolio cipherbliss',
|
||||
domain: 'portfolio.cipherbliss.com',
|
||||
framework: 'symfony',
|
||||
disableSSL: false,
|
||||
|
||||
}, {
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'Blog tykayn - le vortex à chats',
|
||||
domain: 'tykayn.fr',
|
||||
framework: 'wordpress',
|
||||
disableSSL: false,
|
||||
|
||||
redirectToNoWWW: true,
|
||||
}, {
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'Site de la compagnie la puce à l\'oreille',
|
||||
domain: 'www.pucealoreille.fr',
|
||||
framework: 'wordpress',
|
||||
disableSSL: false,
|
||||
|
||||
}, {
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'Site de Didier, un bec et des ailes',
|
||||
domain: 'www.unbecetdesailes.fr',
|
||||
framework: 'wordpress',
|
||||
disableSSL: false,
|
||||
|
||||
}, {
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'Site de Catherine Fonder, conteuse',
|
||||
domain: 'www.catherinefonder.fr',
|
||||
framework: 'wordpress',
|
||||
disableSSL: false,
|
||||
|
||||
}, {
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'Site de la Fromagerie BSF',
|
||||
domain: 'www.lafromagerie-bsf.com',
|
||||
framework: 'wordpress',
|
||||
disableSSL: false,
|
||||
|
||||
redirectToNoWWW: true,
|
||||
},
|
||||
{
|
||||
LXCcontainerLocalIP,
|
||||
@ -59,7 +83,7 @@ const domainsConfig = [{
|
||||
name: 'Claire Lemoine portfolio',
|
||||
domain: 'www.clairelemoine.art',
|
||||
framework: 'wordpress',
|
||||
disableSSL: false,
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
@ -68,7 +92,7 @@ const domainsConfig = [{
|
||||
name: 'Blog Qzine',
|
||||
domain: 'qzine.fr',
|
||||
framework: 'wordpress',
|
||||
disableSSL: false,
|
||||
|
||||
},
|
||||
{
|
||||
LXCcontainerLocalIP,
|
||||
@ -76,14 +100,14 @@ const domainsConfig = [{
|
||||
name: 'Funky Framadate Démo',
|
||||
domain: 'framadate-api.cipherbliss.com',
|
||||
framework: 'symfony',
|
||||
disableSSL: false,
|
||||
|
||||
}, {
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'Portfolio cipherbliss',
|
||||
domain: 'portfolio.cipherbliss.com',
|
||||
framework: 'symfony',
|
||||
disableSSL: false,
|
||||
|
||||
},
|
||||
{
|
||||
LXCcontainerLocalIP,
|
||||
@ -91,7 +115,126 @@ const domainsConfig = [{
|
||||
name: 'Caisse Bliss',
|
||||
domain: 'caisse.cipherbliss.com',
|
||||
framework: 'symfony',
|
||||
disableSSL: false,
|
||||
|
||||
},
|
||||
{
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'Meting pot',
|
||||
domain: 'meltingpot.cipherbliss.com',
|
||||
framework: 'static',
|
||||
|
||||
},
|
||||
{
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'sous domaine de cipherbliss',
|
||||
domain: 'bitwarden.cipherbliss.com',
|
||||
framework: 'static',
|
||||
|
||||
},
|
||||
{
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'sous domaine de cipherbliss',
|
||||
domain: 'c.cipherbliss.com',
|
||||
framework: 'static',
|
||||
|
||||
},
|
||||
{
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'sous domaine de cipherbliss',
|
||||
domain: 'bridge.cipherbliss.com',
|
||||
framework: 'static',
|
||||
|
||||
},
|
||||
{
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'sous domaine de cipherbliss',
|
||||
domain: 'calc.cipherbliss.com',
|
||||
framework: 'static',
|
||||
|
||||
},
|
||||
{
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'sous domaine de cipherbliss',
|
||||
domain: 'events.cipherbliss.com',
|
||||
framework: 'static',
|
||||
|
||||
},
|
||||
{
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'sous domaine de cipherbliss',
|
||||
domain: 'icinga.cipherbliss.com',
|
||||
framework: 'static',
|
||||
|
||||
},
|
||||
{
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'sous domaine de cipherbliss',
|
||||
domain: 'monit.cipherbliss.com',
|
||||
framework: 'static',
|
||||
|
||||
},
|
||||
{
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'sous domaine de cipherbliss',
|
||||
domain: 'music.cipherbliss.com',
|
||||
framework: 'static',
|
||||
|
||||
},
|
||||
{
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'sous domaine de cipherbliss',
|
||||
domain: 'nas.cipherbliss.com',
|
||||
framework: 'static',
|
||||
|
||||
},
|
||||
{
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'sous domaine de cipherbliss',
|
||||
domain: 'pass.cipherbliss.com',
|
||||
framework: 'static',
|
||||
|
||||
},
|
||||
{
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'sous domaine de cipherbliss',
|
||||
domain: 'demo.cipherbliss.com',
|
||||
framework: 'static'
|
||||
},
|
||||
{
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'sous domaine de cipherbliss',
|
||||
domain: 'log.cipherbliss.com',
|
||||
framework: 'static',
|
||||
|
||||
},
|
||||
{
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'sous domaine de cipherbliss',
|
||||
domain: 'participalibre.cipherbliss.com',
|
||||
framework: 'static',
|
||||
|
||||
},
|
||||
{
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'rtfm',
|
||||
domain: 'www.free-software-academy.com',
|
||||
framework: 'static',
|
||||
|
||||
},
|
||||
{
|
||||
LXCcontainerLocalIP,
|
||||
@ -99,7 +242,7 @@ const domainsConfig = [{
|
||||
name: 'Sondages Qzine',
|
||||
domain: 'sondages.qzine.fr',
|
||||
framework: 'symfony',
|
||||
disableSSL: false,
|
||||
|
||||
},
|
||||
{
|
||||
LXCcontainerLocalIP,
|
||||
@ -107,14 +250,39 @@ const domainsConfig = [{
|
||||
name: 'Chaton coussinet',
|
||||
domain: 'www.coussinet.org',
|
||||
framework: 'static',
|
||||
disableSSL: false,
|
||||
|
||||
},
|
||||
{
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'panel proxmox coussinet',
|
||||
domain: 'panel.coussinet.org',
|
||||
framework: 'static',
|
||||
|
||||
},
|
||||
{
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'forge sources coussinet',
|
||||
domain: 'source.coussinet.org',
|
||||
framework: 'static',
|
||||
|
||||
},
|
||||
{
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'Join Fediverse',
|
||||
domain: 'www.joinfediverse.org',
|
||||
redirectToWWW: true,
|
||||
framework: 'static',
|
||||
disableSSL: false,
|
||||
|
||||
},
|
||||
{
|
||||
LXCcontainerLocalIP,
|
||||
LXCcontainerProtocol,
|
||||
name: 'nextcloud',
|
||||
domain: 'cloud.tykayn.fr',
|
||||
framework: 'nextcloud',
|
||||
|
||||
},
|
||||
]
|
||||
|
@ -8,8 +8,7 @@ import { makeHostFileForWordpress } from './model.wordpress.mjs'
|
||||
import { makeHostFileForSymfony } from './model.symfony.mjs'
|
||||
import { makeHostFileForPhpPages } from './model.php-website.mjs'
|
||||
import { domainsConfig } from './domains.mjs'
|
||||
|
||||
|
||||
import { makeHostFileForNextcloud } from './model.nextcloud.mjs'
|
||||
|
||||
// autres frameworks:
|
||||
// nextcloud: cloud.tykayn.fr
|
||||
@ -21,10 +20,11 @@ import { domainsConfig } from './domains.mjs'
|
||||
// meltingpot.cipherbliss.com
|
||||
// joinfediverse
|
||||
// coussinet
|
||||
let domainsForHostFile = [];
|
||||
let domainsForHostFile = []
|
||||
let createFoldersScript = ''
|
||||
|
||||
let domainsSorted = domainsConfig.sort((a,b)=>{
|
||||
return a.domain - b.domain;
|
||||
let domainsSorted = domainsConfig.sort((a, b) => {
|
||||
return a.domain - b.domain
|
||||
})
|
||||
|
||||
for (let configDomain of domainsSorted) {
|
||||
@ -39,15 +39,45 @@ for (let configDomain of domainsSorted) {
|
||||
if (configDomain.framework === 'symfony') {
|
||||
hostFile = makeHostFileForSymfony(configDomain)
|
||||
}
|
||||
if (configDomain.framework === 'nextcloud') {
|
||||
hostFile = makeHostFileForNextcloud(configDomain)
|
||||
}
|
||||
if (configDomain.framework === 'static') {
|
||||
hostFile = makeHostFileForPhpPages(configDomain)
|
||||
}
|
||||
|
||||
createFoldersScript += '# --------- \n'
|
||||
createFoldersScript += 'mkdir -p /home/www/' + configDomain.domain + ' \n'
|
||||
createFoldersScript += 'touch /home/www/' + configDomain.domain + '/index.html \n'
|
||||
createFoldersScript += 'echo "coucou ' + configDomain.domain + '" > /home/www/' + configDomain.domain + '/index.html \n'
|
||||
createFoldersScript += ' \n'
|
||||
|
||||
writeFile(configDomain.domain + '_direct.conf', hostFile.noContainerNginxConf)
|
||||
}else{
|
||||
|
||||
writeFile(configDomain.domain + '_host.conf', hostFile.homeNginxConf)
|
||||
writeFile(configDomain.domain + '_container.conf', hostFile.containerNginxConf)
|
||||
let hostfileDomains = domainsForHostFile.map(domain => ' 127.0.0.1 '+domain+' \n')
|
||||
console.log('hostfileDomains', hostfileDomains.join('').replace(',',''))
|
||||
}
|
||||
|
||||
writeFile('hosts', hostfileDomains.join('').replace(',',''))
|
||||
let renewCertbotScript = domainsForHostFile.map(domain => {
|
||||
if (domain.redirectToNoWWW || domain.includes('www.')) {
|
||||
|
||||
return ' certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d ' + domain + ' -d ' + domain.replace('www.', '') + ' \n'
|
||||
} else {
|
||||
return ' certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d ' + domain + ' \n'
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
let hostfileDomains = domainsForHostFile.sort((a, b) => {
|
||||
return a - b
|
||||
}).map(domain => ' 127.0.0.1\t' + domain + ' \n')
|
||||
console.log('hostfileDomains', hostfileDomains.join('').replace(',', ''))
|
||||
|
||||
writeFile('certbot_renew.sh', '!#/bin/bash\n' + renewCertbotScript.join('').replace(',', ''))
|
||||
|
||||
writeFile('folders_create.sh', createFoldersScript.replace(',', ''))
|
||||
writeFile('hosts', hostfileDomains.join('')
|
||||
.replace(',', ''))
|
||||
}
|
||||
|
||||
function writeFile (fileName, fileContent) {
|
||||
|
95
nginx_config_maker/model.nextcloud.mjs
Normal file
95
nginx_config_maker/model.nextcloud.mjs
Normal file
@ -0,0 +1,95 @@
|
||||
/**
|
||||
* turns a domain config to two config files for nginx web sever on proxmox and its container
|
||||
* @param domainConfig
|
||||
* @returns {{homeNginxConf: string, containerNginxConf: string, noContainerNginxConf: string}}
|
||||
*/
|
||||
export function makeHostFileForNextcloud (domainConfig) {
|
||||
|
||||
let domainWithoutWWW = domainConfig.domain;
|
||||
if(domainConfig.domain.includes('www.')){
|
||||
domainWithoutWWW = domainConfig.domain.replace('www.', '')
|
||||
}
|
||||
|
||||
let redirectToNoWWW = domainConfig.redirectToNoWWW | false;
|
||||
let redirectToNoWWWConf = `
|
||||
server {
|
||||
# redirect from www to non-www
|
||||
server_name ${domainConfig.domain};
|
||||
listen 80 http2;
|
||||
return 301 https://${domainWithoutWWW}$request_uri;
|
||||
}
|
||||
`;
|
||||
|
||||
let redirectToWWW = domainConfig.redirectToWWW | true;
|
||||
let redirectToWWWConf = `
|
||||
server {
|
||||
# redirect from non-www to www
|
||||
server_name ${domainWithoutWWW};
|
||||
listen 80 http2;
|
||||
return 301 https://${domainConfig.domain}$request_uri;
|
||||
}
|
||||
`;
|
||||
|
||||
let redirectToHTTPS = domainConfig.redirectToNoHTTPS | true;
|
||||
let redirectToHTTPSConf = `
|
||||
server {
|
||||
# redirect to https from http no WWW
|
||||
server_name ${domainWithoutWWW};
|
||||
listen 80 http2;
|
||||
return 301 https://${domainWithoutWWW}$request_uri;
|
||||
}
|
||||
`;
|
||||
if(redirectToWWW && redirectToHTTPS){
|
||||
redirectToWWWConf += `\tserver {
|
||||
\t\t\t\t# redirect from www to HTTPS too
|
||||
server_name ${domainConfig.domain};
|
||||
listen 80 http2;
|
||||
return 301 https://${domainConfig.domain}$request_uri;
|
||||
}`
|
||||
}
|
||||
|
||||
let hostingFileAccess = ` `;
|
||||
|
||||
/**
|
||||
*
|
||||
* @type {{homeNginxConf: string, containerNginxConf: string, noContainerNginxConf: string}}
|
||||
*/
|
||||
const model = {
|
||||
|
||||
noContainerNginxConf: `
|
||||
# ============ ${domainConfig.name} ===============
|
||||
`,
|
||||
homeNginxConf: `
|
||||
# ============ ${domainConfig.name} ===============
|
||||
|
||||
server {
|
||||
server_name ${domainConfig.domain};
|
||||
listen 80;
|
||||
return 301 ${domainConfig.domain}$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name ${domainConfig.domain};
|
||||
ssl_certificate /etc/letsencrypt/live/${domainConfig.domain}/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/${domainConfig.domain}/privkey.pem;
|
||||
location / {
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header Host $http_host;
|
||||
# Container nextcloud
|
||||
proxy_pass https://10.10.10.106;
|
||||
}
|
||||
add_header Permissions-Policy "interest-cohort=()";
|
||||
}
|
||||
|
||||
|
||||
`,
|
||||
containerNginxConf: `
|
||||
# ============ ${domainConfig.name} | côté conteneur LXC ===============
|
||||
# rien à ajouter si c'est du snap
|
||||
# ========================== ${domainConfig.name} | fin ================ #
|
||||
`
|
||||
}
|
||||
return model
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* turns a domain config to two config files for nginx web sever on proxmox and its container
|
||||
* @param domainConfig
|
||||
* @returns {{homeNginxConf: string, containerNginxConf: string}}
|
||||
* @returns {{homeNginxConf: string, containerNginxConf: string, noContainerNginxConf: string}}
|
||||
*/
|
||||
export function makeHostFileForPhpPages (domainConfig) {
|
||||
|
||||
@ -9,41 +9,124 @@ export function makeHostFileForPhpPages (domainConfig) {
|
||||
if(domainConfig.domain.includes('www.')){
|
||||
domainWithoutWWW = domainConfig.domain.replace('www.', '')
|
||||
}
|
||||
let certbotChallengeAcmeRedirect = `
|
||||
\tlocation ^~ /.well-known/acme-challenge/ {
|
||||
\t\tallow all;
|
||||
\t\troot /var/lib/letsencrypt/;
|
||||
\t\tdefault_type "text/plain";
|
||||
\t\ttry_files $uri =404;
|
||||
\t}
|
||||
`;
|
||||
|
||||
let redirectToNoWWW = false;
|
||||
let redirectToNoWWW = domainConfig.redirectToNoWWW | false;
|
||||
let redirectToNoWWWConf = `
|
||||
server {
|
||||
# redirect from www to non-www
|
||||
server_name ${domainConfig.domain};
|
||||
listen 80 http2;
|
||||
return 301 https://${domainWithoutWWW}$request_uri;
|
||||
}
|
||||
\tserver {
|
||||
\t\t# redirect from www to non-www
|
||||
\t\tserver_name ${domainConfig.domain};
|
||||
\t\tlisten 80 http2;
|
||||
\t\treturn 301 https://${domainWithoutWWW}$request_uri;
|
||||
\t}
|
||||
`;
|
||||
|
||||
let redirectToWWW = true;
|
||||
let redirectToWWW = domainConfig.redirectToWWW | true;
|
||||
let redirectToWWWConf = `
|
||||
server {
|
||||
# redirect from non-www to www
|
||||
server_name ${domainWithoutWWW};
|
||||
listen 80 http2;
|
||||
return 301 https://${domainConfig.domain}$request_uri;
|
||||
}
|
||||
\tserver {
|
||||
\t\t# redirect from non-www to www
|
||||
\t\tserver_name ${domainWithoutWWW};
|
||||
\t\tlisten 80 http2;
|
||||
\t\treturn 301 https://${domainConfig.domain}$request_uri;
|
||||
\t}
|
||||
`;
|
||||
|
||||
let redirectToHTTPS = true;
|
||||
let redirectToHTTPS = domainConfig.redirectToNoHTTPS | true;
|
||||
let redirectToHTTPSConf = `
|
||||
server {
|
||||
# redirect to https from http
|
||||
\tserver {
|
||||
\t\t# redirect to https from http no WWW
|
||||
\t\tserver_name ${domainWithoutWWW};
|
||||
\t\tlisten 80 http2;
|
||||
|
||||
${certbotChallengeAcmeRedirect}
|
||||
|
||||
\t\t# return 301 https://${domainWithoutWWW}$request_uri;
|
||||
\t}
|
||||
`;
|
||||
if(redirectToWWW && redirectToHTTPS){
|
||||
redirectToWWWConf += `\tserver {
|
||||
\t\t\t\t# redirect from www to HTTPS too
|
||||
server_name ${domainConfig.domain};
|
||||
listen 80 http2;
|
||||
return 301 https://${domainConfig.domain}$request_uri;
|
||||
}
|
||||
`;
|
||||
}`
|
||||
}
|
||||
|
||||
let hostingFileAccess = `
|
||||
# ----------- hosting file config ----------------
|
||||
|
||||
root /home/www/${domainConfig.domain};
|
||||
|
||||
index index.php index.html;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
location ~ \\.php$ {
|
||||
include fastcgi.conf;
|
||||
fastcgi_intercept_errors on;
|
||||
fastcgi_pass php-handler;
|
||||
}
|
||||
|
||||
location ~* \\.(js|css|png|jpg|jpeg|gif|ico)$ {
|
||||
expires max;
|
||||
log_not_found off;
|
||||
}
|
||||
|
||||
add_header Permissions-Policy "interest-cohort=()";
|
||||
|
||||
include /etc/nginx/snippets/letsencrypt-acme-challenge.conf;
|
||||
`;
|
||||
|
||||
|
||||
/**
|
||||
* @type {{homeNginxConf: string, containerNginxConf: string}}
|
||||
*
|
||||
* @type {{homeNginxConf: string, containerNginxConf: string, noContainerNginxConf: string}}
|
||||
*/
|
||||
const model = {
|
||||
|
||||
noContainerNginxConf: `
|
||||
# ============ ${domainConfig.name} ===============
|
||||
|
||||
${redirectToNoWWW ? redirectToNoWWWConf : '' }
|
||||
|
||||
${redirectToWWW ? redirectToWWWConf : '' }
|
||||
|
||||
${redirectToHTTPS ? redirectToHTTPSConf : '' }
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
server_name ${domainConfig.domain};
|
||||
ssl_certificate /etc/letsencrypt/live/${domainConfig.domain}-0001/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/${domainConfig.domain}-0001/privkey.pem;
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
|
||||
|
||||
|
||||
${hostingFileAccess}
|
||||
${certbotChallengeAcmeRedirect}
|
||||
}
|
||||
`,
|
||||
homeNginxConf: `
|
||||
# ============ ${domainConfig.name} ===============
|
||||
|
||||
@ -62,15 +145,7 @@ server {
|
||||
ssl_certificate_key /etc/letsencrypt/live/${domainConfig.domain}-0001/privkey.pem;
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
|
||||
|
||||
location / {
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header Host $http_host;
|
||||
# Container tksites
|
||||
proxy_pass ${domainConfig.LXCcontainerProtocol}://${domainConfig.LXCcontainerLocalIP};
|
||||
}
|
||||
|
||||
add_header Permissions-Policy "interest-cohort=()";
|
||||
include /etc/nginx/snippets/letsencrypt-acme-challenge.conf;
|
||||
${hostingFileAccess}
|
||||
}
|
||||
`,
|
||||
containerNginxConf: `
|
||||
@ -85,38 +160,7 @@ server {
|
||||
listen [::]:80 ;
|
||||
server_name ${domainConfig.domain};
|
||||
|
||||
add_header Permissions-Policy "interest-cohort=()";
|
||||
|
||||
root /home/www/${domainConfig.domain};
|
||||
index index.php index.html;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
location ~ \\.php$ {
|
||||
#NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
|
||||
include fastcgi.conf;
|
||||
fastcgi_intercept_errors on;
|
||||
fastcgi_pass php-handler;
|
||||
}
|
||||
|
||||
location ~* \\.(js|css|png|jpg|jpeg|gif|ico)$ {
|
||||
expires max;
|
||||
log_not_found off;
|
||||
}
|
||||
add_header Permissions-Policy "interest-cohort=()";
|
||||
${hostingFileAccess}
|
||||
|
||||
}
|
||||
# ========================== ${domainConfig.name} | fin ================ #
|
||||
|
@ -5,6 +5,7 @@
|
||||
*/
|
||||
export function makeHostFileForSymfony(domainConfig){
|
||||
const model = {
|
||||
noContainerNginxConf: ``,
|
||||
homeNginxConf : `
|
||||
# ---------------- ${domainConfig.name} -------------------------
|
||||
# ---------- un site utilisant Symfony --------------------------
|
||||
|
@ -17,6 +17,7 @@ export function makeHostFileForWordpress (domainConfig) {
|
||||
* @type {{homeNginxConf: string, containerNginxConf: string}}
|
||||
*/
|
||||
const model = {
|
||||
noContainerNginxConf: ``,
|
||||
homeNginxConf: `
|
||||
# ============ ${domainConfig.name} ===============
|
||||
# ---------- un site utilisant Wordpress ----------
|
||||
|
34
nginx_config_maker/output/certbot_renew.sh
Normal file
34
nginx_config_maker/output/certbot_renew.sh
Normal file
@ -0,0 +1,34 @@
|
||||
!#/bin/bash
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d www.cipherbliss.com -d cipherbliss.com
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d portfolio.cipherbliss.com
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d tykayn.fr
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d www.pucealoreille.fr -d pucealoreille.fr
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d www.unbecetdesailes.fr -d unbecetdesailes.fr
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d www.catherinefonder.fr -d catherinefonder.fr
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d www.lafromagerie-bsf.com -d lafromagerie-bsf.com
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d www.clairelemoine.art -d clairelemoine.art
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d qzine.fr
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d framadate-api.cipherbliss.com
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d portfolio.cipherbliss.com
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d caisse.cipherbliss.com
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d meltingpot.cipherbliss.com
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d bitwarden.cipherbliss.com
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d c.cipherbliss.com
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d bridge.cipherbliss.com
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d calc.cipherbliss.com
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d events.cipherbliss.com
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d icinga.cipherbliss.com
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d monit.cipherbliss.com
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d music.cipherbliss.com
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d nas.cipherbliss.com
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d pass.cipherbliss.com
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d demo.cipherbliss.com
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d log.cipherbliss.com
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d participalibre.cipherbliss.com
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d www.free-software-academy.com -d free-software-academy.com
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d sondages.qzine.fr
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d www.coussinet.org -d coussinet.org
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d panel.coussinet.org
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d source.coussinet.org
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d www.joinfediverse.org -d joinfediverse.org
|
||||
certbot certonly -a webroot --webroot-path=/tmp/letsencrypt-auto -d cloud.tykayn.fr
|
95
nginx_config_maker/output/folders_create.sh
Normal file
95
nginx_config_maker/output/folders_create.sh
Normal file
@ -0,0 +1,95 @@
|
||||
# ---------
|
||||
mkdir -p /home/www/meltingpot.cipherbliss.com
|
||||
touch /home/www/meltingpot.cipherbliss.com/index.html
|
||||
echo "coucou meltingpot.cipherbliss.com" > /home/www/meltingpot.cipherbliss.com/index.html
|
||||
|
||||
# ---------
|
||||
mkdir -p /home/www/bitwarden.cipherbliss.com
|
||||
touch /home/www/bitwarden.cipherbliss.com/index.html
|
||||
echo "coucou bitwarden.cipherbliss.com" > /home/www/bitwarden.cipherbliss.com/index.html
|
||||
|
||||
# ---------
|
||||
mkdir -p /home/www/c.cipherbliss.com
|
||||
touch /home/www/c.cipherbliss.com/index.html
|
||||
echo "coucou c.cipherbliss.com" > /home/www/c.cipherbliss.com/index.html
|
||||
|
||||
# ---------
|
||||
mkdir -p /home/www/bridge.cipherbliss.com
|
||||
touch /home/www/bridge.cipherbliss.com/index.html
|
||||
echo "coucou bridge.cipherbliss.com" > /home/www/bridge.cipherbliss.com/index.html
|
||||
|
||||
# ---------
|
||||
mkdir -p /home/www/calc.cipherbliss.com
|
||||
touch /home/www/calc.cipherbliss.com/index.html
|
||||
echo "coucou calc.cipherbliss.com" > /home/www/calc.cipherbliss.com/index.html
|
||||
|
||||
# ---------
|
||||
mkdir -p /home/www/events.cipherbliss.com
|
||||
touch /home/www/events.cipherbliss.com/index.html
|
||||
echo "coucou events.cipherbliss.com" > /home/www/events.cipherbliss.com/index.html
|
||||
|
||||
# ---------
|
||||
mkdir -p /home/www/icinga.cipherbliss.com
|
||||
touch /home/www/icinga.cipherbliss.com/index.html
|
||||
echo "coucou icinga.cipherbliss.com" > /home/www/icinga.cipherbliss.com/index.html
|
||||
|
||||
# ---------
|
||||
mkdir -p /home/www/monit.cipherbliss.com
|
||||
touch /home/www/monit.cipherbliss.com/index.html
|
||||
echo "coucou monit.cipherbliss.com" > /home/www/monit.cipherbliss.com/index.html
|
||||
|
||||
# ---------
|
||||
mkdir -p /home/www/music.cipherbliss.com
|
||||
touch /home/www/music.cipherbliss.com/index.html
|
||||
echo "coucou music.cipherbliss.com" > /home/www/music.cipherbliss.com/index.html
|
||||
|
||||
# ---------
|
||||
mkdir -p /home/www/nas.cipherbliss.com
|
||||
touch /home/www/nas.cipherbliss.com/index.html
|
||||
echo "coucou nas.cipherbliss.com" > /home/www/nas.cipherbliss.com/index.html
|
||||
|
||||
# ---------
|
||||
mkdir -p /home/www/pass.cipherbliss.com
|
||||
touch /home/www/pass.cipherbliss.com/index.html
|
||||
echo "coucou pass.cipherbliss.com" > /home/www/pass.cipherbliss.com/index.html
|
||||
|
||||
# ---------
|
||||
mkdir -p /home/www/demo.cipherbliss.com
|
||||
touch /home/www/demo.cipherbliss.com/index.html
|
||||
echo "coucou demo.cipherbliss.com" > /home/www/demo.cipherbliss.com/index.html
|
||||
|
||||
# ---------
|
||||
mkdir -p /home/www/log.cipherbliss.com
|
||||
touch /home/www/log.cipherbliss.com/index.html
|
||||
echo "coucou log.cipherbliss.com" > /home/www/log.cipherbliss.com/index.html
|
||||
|
||||
# ---------
|
||||
mkdir -p /home/www/participalibre.cipherbliss.com
|
||||
touch /home/www/participalibre.cipherbliss.com/index.html
|
||||
echo "coucou participalibre.cipherbliss.com" > /home/www/participalibre.cipherbliss.com/index.html
|
||||
|
||||
# ---------
|
||||
mkdir -p /home/www/www.free-software-academy.com
|
||||
touch /home/www/www.free-software-academy.com/index.html
|
||||
echo "coucou www.free-software-academy.com" > /home/www/www.free-software-academy.com/index.html
|
||||
|
||||
# ---------
|
||||
mkdir -p /home/www/www.coussinet.org
|
||||
touch /home/www/www.coussinet.org/index.html
|
||||
echo "coucou www.coussinet.org" > /home/www/www.coussinet.org/index.html
|
||||
|
||||
# ---------
|
||||
mkdir -p /home/www/panel.coussinet.org
|
||||
touch /home/www/panel.coussinet.org/index.html
|
||||
echo "coucou panel.coussinet.org" > /home/www/panel.coussinet.org/index.html
|
||||
|
||||
# ---------
|
||||
mkdir -p /home/www/source.coussinet.org
|
||||
touch /home/www/source.coussinet.org/index.html
|
||||
echo "coucou source.coussinet.org" > /home/www/source.coussinet.org/index.html
|
||||
|
||||
# ---------
|
||||
mkdir -p /home/www/www.joinfediverse.org
|
||||
touch /home/www/www.joinfediverse.org/index.html
|
||||
echo "coucou www.joinfediverse.org" > /home/www/www.joinfediverse.org/index.html
|
||||
|
@ -1,15 +1,33 @@
|
||||
127.0.0.1 www.cipherbliss.com
|
||||
127.0.0.1 portfolio.cipherbliss.com
|
||||
127.0.0.1 tykayn.fr
|
||||
127.0.0.1 www.pucealoreille.fr
|
||||
127.0.0.1 www.unbecetdesailes.fr
|
||||
127.0.0.1 www.catherinefonder.fr
|
||||
127.0.0.1 www.lafromagerie-bsf.com
|
||||
127.0.0.1 www.clairelemoine.art
|
||||
127.0.0.1 qzine.fr
|
||||
127.0.0.1 framadate-api.cipherbliss.com
|
||||
127.0.0.1 portfolio.cipherbliss.com
|
||||
127.0.0.1 caisse.cipherbliss.com
|
||||
127.0.0.1 sondages.qzine.fr
|
||||
127.0.0.1 www.coussinet.org
|
||||
127.0.0.1 www.joinfediverse.org
|
||||
127.0.0.1 www.cipherbliss.com
|
||||
127.0.0.1 portfolio.cipherbliss.com
|
||||
127.0.0.1 tykayn.fr
|
||||
127.0.0.1 www.pucealoreille.fr
|
||||
127.0.0.1 www.unbecetdesailes.fr
|
||||
127.0.0.1 www.catherinefonder.fr
|
||||
127.0.0.1 www.lafromagerie-bsf.com
|
||||
127.0.0.1 www.clairelemoine.art
|
||||
127.0.0.1 qzine.fr
|
||||
127.0.0.1 framadate-api.cipherbliss.com
|
||||
127.0.0.1 portfolio.cipherbliss.com
|
||||
127.0.0.1 caisse.cipherbliss.com
|
||||
127.0.0.1 meltingpot.cipherbliss.com
|
||||
127.0.0.1 bitwarden.cipherbliss.com
|
||||
127.0.0.1 c.cipherbliss.com
|
||||
127.0.0.1 bridge.cipherbliss.com
|
||||
127.0.0.1 calc.cipherbliss.com
|
||||
127.0.0.1 events.cipherbliss.com
|
||||
127.0.0.1 icinga.cipherbliss.com
|
||||
127.0.0.1 monit.cipherbliss.com
|
||||
127.0.0.1 music.cipherbliss.com
|
||||
127.0.0.1 nas.cipherbliss.com
|
||||
127.0.0.1 pass.cipherbliss.com
|
||||
127.0.0.1 demo.cipherbliss.com
|
||||
127.0.0.1 log.cipherbliss.com
|
||||
127.0.0.1 participalibre.cipherbliss.com
|
||||
127.0.0.1 www.free-software-academy.com
|
||||
127.0.0.1 sondages.qzine.fr
|
||||
127.0.0.1 www.coussinet.org
|
||||
127.0.0.1 panel.coussinet.org
|
||||
127.0.0.1 source.coussinet.org
|
||||
127.0.0.1 www.joinfediverse.org
|
||||
127.0.0.1 cloud.tykayn.fr
|
||||
|
Loading…
Reference in New Issue
Block a user