mirror of
https://gitlab.com/octospacc/Configs.git
synced 2025-03-13 17:20:14 +01:00
Auto-Backup $'Sun Jan 26 2025 01:06:41 GMT+0100 (Central European Standard Time)'
This commit is contained in:
parent
126d1d5405
commit
da2ef95f83
@ -145,7 +145,8 @@ Jobs.Cloud_Doku = async () => {
|
||||
await GitPullPush();
|
||||
};
|
||||
|
||||
Jobs.Cloud_Memos = async () => {
|
||||
// NOTE: embedded media is not handled (neither included nor downloaded)
|
||||
Jobs.archivioctt_Memos = async () => {
|
||||
EnsureFolder('./archivioctt-Git/docs/memos');
|
||||
await $`rm -f * || true`;
|
||||
await stream.Readable.fromWeb((await fetch('https://memos.octt.eu.org/memos.api.v1.MemoService/ExportMemos', {
|
||||
@ -162,6 +163,34 @@ Jobs.Cloud_Memos = async () => {
|
||||
await GitPullPush();
|
||||
};
|
||||
|
||||
// NOTE: post tags, post location, and media license are not handled; media is not redownloaded
|
||||
Jobs.archivioctt_Pixelfed = async () => {
|
||||
EnsureFolder('./archivioctt-Git/docs/pictures/posts');
|
||||
const allPosts = [];
|
||||
for (const identity of ["liminalgici.spacc.eu.org:664033260845064193"]) {
|
||||
let offset = '';
|
||||
const [instance, account] = identity.split(':');
|
||||
while (true) {
|
||||
const posts = (await (await fetch(`https://${instance}/api/pixelfed/v1/accounts/${account}/statuses?only_media=true&max_id=${offset}`)).json());
|
||||
if (posts.length > 0) {
|
||||
offset = posts.slice(-1)[0].id;
|
||||
allPosts.push(...posts);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const post of allPosts) {
|
||||
fs.writeFileSync(`${post.id}.md`, `---
|
||||
canonical_url: ${post.url}
|
||||
date: ${post.created_at}
|
||||
tags: ${post.tags.map(tag => `\n - ${tag.name}`).join('')}
|
||||
---
|
||||
\n${post.content.replaceAll('<br />', '')}
|
||||
\n${post.media_attachments.map(media => ``).join('\n\n')}`);
|
||||
}
|
||||
};
|
||||
|
||||
Jobs.Mixed_OctospaccAltervista = async () => {
|
||||
await AltervistaFullBackup('octospacc.altervista.org');
|
||||
cd('../microblog-mirror');
|
||||
@ -280,9 +309,15 @@ const Main = async () => {
|
||||
await Work('Cloud_SpaccBBSNodeBB');
|
||||
await Work('Cloud_liminalgici');
|
||||
await Work('Cloud_Doku');
|
||||
await Work('Cloud_Memos');
|
||||
await Work('Cloud_SpaccCraft');
|
||||
await Work('Cloud_Private');
|
||||
|
||||
//await Work('archivioctt_Memos');
|
||||
//await Work('archivioctt_Pixelfed');
|
||||
//await Work('archivioctt_WordPress');
|
||||
// POST https://public-api.wordpress.com/rest/v1.1/sites/SITEID/exports/start
|
||||
// GET https://public-api.wordpress.com/rest/v1.1/sites/SITEID/exports/0?
|
||||
// ... {status:"running"} ... {status:"finished","attachment_url":"...zip"}
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -17,6 +17,8 @@ http {
|
||||
##
|
||||
# Basic Settings
|
||||
##
|
||||
fastcgi_buffers 16 16k;
|
||||
fastcgi_buffer_size 32k;
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
|
@ -10,7 +10,7 @@ server {
|
||||
location / {
|
||||
proxy_http_version 1.1;
|
||||
proxy_buffering off;
|
||||
proxy_pass http://localhost:30264;
|
||||
proxy_pass http://127.0.0.1:30264;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
26
Server/Root/etc/nginx/sites-available/kirby.conf
Normal file
26
Server/Root/etc/nginx/sites-available/kirby.conf
Normal file
@ -0,0 +1,26 @@
|
||||
server {
|
||||
listen 80;
|
||||
index index.php index.html;
|
||||
server_name test.octt.eu.org;
|
||||
root /Main/Server/www/kirby;
|
||||
|
||||
default_type text/plain;
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
|
||||
rewrite ^/(content|site|kirby)/(.*)$ /error last;
|
||||
rewrite ^/\.(?!well-known/) /error last;
|
||||
rewrite ^/(?!app\.webmanifest)[^/]+$ /index.php last;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php$is_args$args;
|
||||
}
|
||||
|
||||
location ~* \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_pass php;
|
||||
include fastcgi.conf;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param SERVER_PORT 80;
|
||||
}
|
||||
}
|
25
Server/Root/etc/nginx/sites-available/proxatore.conf
Normal file
25
Server/Root/etc/nginx/sites-available/proxatore.conf
Normal file
@ -0,0 +1,25 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen 443 ssl;
|
||||
server_name proxatore.octt.eu.org;
|
||||
ssl_certificate /etc/letsencrypt/live/proxatore.octt.eu.org/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/proxatore.octt.eu.org/privkey.pem;
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
root /Main/Server/www/root;
|
||||
|
||||
location / {
|
||||
include fastcgi_params;
|
||||
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; # Adjust PHP version and socket path as needed
|
||||
fastcgi_index Proxatore.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root/Proxatore.php;
|
||||
}
|
||||
|
||||
access_log /var/log/nginx/proxatore.access.log;
|
||||
error_log /var/log/nginx/proxatore.error.log;
|
||||
|
||||
# Optional: Restrict file access
|
||||
location ~ /\.(?!well-known).* {
|
||||
deny all;
|
||||
}
|
||||
}
|
@ -8,32 +8,6 @@ server {
|
||||
rewrite ^ $scheme://hlb0.octt.eu.org$request_uri? permanent;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen 81;
|
||||
error_page 403 = /error.php?code=403;
|
||||
error_page 404 = /error.php?code=404;
|
||||
error_page 500 = /error.php?code=500;
|
||||
access_log /var/log/nginx/root.access.log;
|
||||
error_log /var/log/nginx/root.error.log;
|
||||
location / {
|
||||
root /Main/Server/www/root;
|
||||
if ($request_uri ~ ^([^.\?]*[^/])$) {
|
||||
return 301 $1/;
|
||||
}
|
||||
try_files $uri $uri/ $uri.html =404;
|
||||
autoindex off;
|
||||
location ~ ^.+?\.php(/.*)?$ {
|
||||
fastcgi_pass php;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
set $path_info $fastcgi_path_info;
|
||||
fastcgi_param PATH_INFO $path_info;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen 81;
|
||||
@ -56,7 +30,7 @@ server {
|
||||
if ($request_uri ~ ^([^.\?]*[^/])$) {
|
||||
return 301 $1/;
|
||||
}
|
||||
try_files $uri $uri/ $uri.html =404;
|
||||
try_files $uri $uri/ $uri.html $uri.json =404;
|
||||
autoindex off;
|
||||
#error_page 404 = /404.html;
|
||||
#rewrite ^/(\?.*)?$ index.html$1 permanent;
|
||||
@ -70,6 +44,11 @@ server {
|
||||
}
|
||||
}
|
||||
|
||||
#location /api/v1/oembed/ {
|
||||
# proxy_pass http://127.0.0.1:8061/oembed$is_args$args;
|
||||
# sub_filter '"type":"link",' '"type":"rich","html":"<p>test 123</p>",';
|
||||
#}
|
||||
|
||||
location /Drive/ {
|
||||
root /Main/Server/www;
|
||||
autoindex on;
|
||||
|
@ -3,7 +3,7 @@ Description=FreshRSS get new content
|
||||
|
||||
[Timer]
|
||||
OnBootSec=30s
|
||||
OnCalendar=*:0/20
|
||||
OnCalendar=*:0/10
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
|
Loading…
x
Reference in New Issue
Block a user