hilfe mein git ist komisch

This commit is contained in:
cutemeli
2026-01-08 18:34:49 +01:00
parent 710537a25d
commit b2d2dce845
4644 changed files with 94994 additions and 1763 deletions

View File

@@ -0,0 +1,2 @@
gzip on;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;

View File

@@ -0,0 +1,14 @@
location = /cp/index.php {
try_files ne @cproute;
}
location ^~ /cp {
alias /opt/psa/admin/cp/public;
try_files $uri @cproute;
}
location @cproute {
include /etc/sw-cp-server/fastcgi_params;
fastcgi_pass unix:/var/run/sw-engine.sock;
fastcgi_param SCRIPT_FILENAME /opt/psa/admin/cp/public/index.php;
}

View File

@@ -0,0 +1,6 @@
location /installer {
proxy_pass https://127.0.0.1:8447;
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 $original_proto;
}

View File

View File

@@ -0,0 +1,2 @@
listen [::]:8443 ipv6only=on ssl;
listen [::]:8880 ipv6only=on;

View File

@@ -0,0 +1 @@
set $maintenance off;

View File

@@ -0,0 +1,16 @@
location /phpMyAdmin {
root /usr/local/psa;
index index.php;
location ~* /phpMyAdmin/(libraries|templates|config\.)(.*) {
deny all;
}
location ~* /phpMyAdmin/(.*)\.php$ {
include /etc/sw-cp-server/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/var/run/sw-engine.sock;
}
}
rewrite (?i)^/phpMyAdmin(.*) /phpMyAdmin$1 last;

View File

@@ -0,0 +1,26 @@
server_names_hash_bucket_size 64;
map $http_x_requested_with $error_doc_format {
default html;
XMLHttpRequest json;
}
map $http_x_forwarded_proto $original_proto {
default $http_x_forwarded_proto;
"" $scheme;
}
server {
listen 8443 ssl;
listen 8880;
listen 127.0.0.1:8880 default_server;
include conf.d/*ipv6_ports.inc;
http2 on;
ssl_certificate /opt/psa/admin/conf/httpsd.pem;
ssl_certificate_key /opt/psa/admin/conf/httpsd.pem;
include conf.d/*plesk.inc;
include conf.d/*wpb.inc;
}

View File

@@ -0,0 +1,103 @@
# Copyright 1999-2025. WebPros International GmbH. All rights reserved.
underscores_in_headers on;
access_log /var/log/plesk/httpsd_access_log main buffer=8k;
index index.php;
root /opt/psa/admin/htdocs;
# Maintenance
include conf.d/maintenance;
if ($uri ~* \.(ico|css|js|gif|jpe?g|png|html|json|svg|woff2)(\?[0-9]+)? ) {
set $maintenance off;
}
if ($maintenance = on) {
return 503;
}
error_page 503 @maintenance;
location @maintenance {
if ($maintenance = on) {
rewrite ^(.*)$ /error_docs/503.1.html break;
}
rewrite ^(.*)$ /error_docs/503.html break;
internal;
}
location /maintenance/ { root /usr/local/psa/var/; }
# End: maintenance
location /extras/ {
alias /usr/local/psa/admin/share/modules/;
}
# Admin panel
location /admin {
alias /opt/psa/admin/application/admin/public;
try_files $uri @route;
}
# SMB panel
location /smb {
alias /opt/psa/admin/application/smb/public;
try_files $uri @route;
}
location @route {
include /etc/sw-cp-server/fastcgi_params;
fastcgi_pass unix:/var/run/sw-engine.sock;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME /opt/psa/admin/htdocs/application.php;
fastcgi_param HTTP_PRAGMA $http_pragma;
}
# Custom skins
location ~ ^/theme-skins {
deny all;
location ~ "\.(css|gif|png|jpg|jpeg|webp|svg|xml|woff|woff2)$" {
allow all;
try_files $uri @default-skin;
}
}
location @default-skin {
rewrite ^/theme-skins/[^/]+/(.*)$ /cp/theme/$1 last;
}
# Backward compatiblity for old URLs
rewrite (login|login_up|logout)\.php3(/|$) /$1.php$2 last;
# New modern
rewrite ^/login/?$ /login_up.php last;
# Rewrite for api
rewrite ^/api/modules/([^/]*)/(.*)$ /modules/$1/public/index.php/$2 last;
rewrite ^/api/(.*)$ /modules/rest-api/public/index.php/$1 last;
location ~* \.php(/|$) {
include /etc/sw-cp-server/fastcgi_params;
fastcgi_pass unix:/var/run/sw-engine.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
# Custom error pages
error_page 400 401 403 404 405 406 407 412 414 415 500 501 502 503 /error_docs/$status.$error_doc_format;
# http to https redirect
error_page 497 https://$host:$server_port$request_uri;
# Content security policy header to prevent XSS and phishing
add_header X-Content-Type-Options "nosniff";
location ~ ^/images/logos {
add_header Content-Security-Policy "default-src 'none'; form-action 'none'; frame-ancestors 'none'; sandbox";
}
# Favicon branding
location /images/favicon.svg {
try_files /images/logos/favicon.custom.svg $uri =404;
}
location /favicon.ico {
try_files /images/logos/favicon.custom.ico $uri =404;
}

View File

@@ -0,0 +1,98 @@
server {
listen 127.0.0.1:8880;
server_name plesk-site-preview.local;
location ~ ^/plesk-site-preview/(?P<internal_host>.*?)/(?P<internal_scheme>https?)/(?P<internal_ip>.*?)/(?P<internal_uri>.*)$ {
# Validate parts of uri to avoid injections
if ($internal_host !~ "^[A-Za-z0-9]([A-Za-z0-9\-]{0,61}[A-Za-z0-9]){0,1}(\.[A-Za-z0-9]([A-Za-z0-9\-]{0,61}[A-Za-z0-9]){0,1}){1,}$") {
return 400;
}
if ($internal_ip !~ "^[A-Fa-f0-9\.\:\[\]]+$") {
return 400;
}
if ($internal_uri ~ "^server-status(/.*)?$") {
return 400;
}
set $dst_path "/plesk-site-preview/$internal_host/$internal_scheme/$internal_ip/";
set $public_scheme "http";
if ($http_x_forwarded_proto = 'https') {
set $public_scheme "https";
}
set $public_ip "";
access_by_lua '
local ip_map = io.open("/etc/sw-cp-server/conf.d/ip_mapping.inc")
if (ip_map == nil) then
ip_map = io.open("/etc/sw-cp-server/conf.d/trusted_ips.inc")
end
if (ip_map == nil) then
ngx.log(ngx.ERR, "Could not find IP map file")
ngx.exit(ngx.HTTP_INTERNAL_SERVER_ERROR)
end
function filter_plesk_cookie()
local headers = ngx.req.get_headers()
if headers == nil or headers["Cookie"] == nil then
return
end
local cookie = headers["Cookie"]
local black_list = {"PLESKSESSID[^=]*", "SBSESSION", "phpMyAdmin", "PPA_ID", "plesk%-[^=]*"}
for k, v in pairs(black_list) do
cookie = cookie:gsub("%s?" .. v .. "=[^;]*;?", ""):gsub("^%s*(.-);?$", "%1")
end
ngx.req.set_header("Cookie", cookie)
end
for ips in ip_map:lines() do
local internal_ip, public_ip = ips:match("([^,]*),?([^,]*)")
if internal_ip == ngx.var.internal_ip then
ngx.var.public_ip = public_ip ~= "" and public_ip or internal_ip
ip_map:close()
filter_plesk_cookie()
return
end
end
ip_map:close()
ngx.log(ngx.ERR, "Forbidden for IP: " .. ngx.var.internal_ip)
ngx.exit(ngx.HTTP_FORBIDDEN)
';
rewrite ^/(.*)$ /$internal_uri break;
proxy_pass $internal_scheme://$internal_ip;
proxy_redirect http://$internal_host/ $public_scheme://$public_ip$dst_path;
proxy_redirect https://$internal_host/ $public_scheme://$public_ip/plesk-site-preview/$internal_host/https/$internal_ip/;
proxy_redirect https://$internal_host:443/ $public_scheme://$public_ip/plesk-site-preview/$internal_host/https/$internal_ip/;
proxy_redirect http://www.$internal_host/ $public_scheme://$public_ip/plesk-site-preview/www.$internal_host/http/$internal_ip/;
proxy_redirect https://www.$internal_host/ $public_scheme://$public_ip/plesk-site-preview/www.$internal_host/https/$internal_ip/;
proxy_redirect https://www.$internal_host:443/ $public_scheme://$public_ip/plesk-site-preview/www.$internal_host/https/$internal_ip/;
proxy_cookie_domain ~^.*$ $host;
proxy_cookie_path / $dst_path;
proxy_set_header Host $internal_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "";
proxy_set_header Is-SitePreview "1";
add_header X-Robots-Tag "noindex,nofollow";
header_filter_by_lua 'ngx.header.content_length = nil';
body_filter_by_lua '
local response_body = ngx.arg[1]
local src_address = "https?://" .. ngx.var.internal_host:gsub("[%-%.%+%[%]%(%)%$%^%%%?%*]", "%%%1") .. "/?"
local dst_address = ngx.var.public_scheme .. "://" .. ngx.var.public_ip .. ngx.var.dst_path
response_body = response_body:gsub(src_address, dst_address)
response_body = response_body:gsub("(src%s*=%s*[\\"\']?)/([^/])", "%1" .. ngx.var.dst_path .. "%2")
response_body = response_body:gsub("(href%s*=%s*[\\"\']?)/([^/])", "%1" .. ngx.var.dst_path .. "%2")
response_body = response_body:gsub("(action%s*=%s*[\\"\']?)/([^/])", "%1" .. ngx.var.dst_path .. "%2")
response_body = response_body:gsub("(url%(%s*[\\"\']?)/([^/])", "%1" .. ngx.var.dst_path .. "%2")
response_body = response_body:gsub("(url%(%s*&quot;)/([^/])", "%1" .. ngx.var.dst_path .. "%2")
response_body = response_body:gsub("(srcset%s*=%s*[\\"\']?)/", "data-plesk-site-preview-ignore-%1/")
ngx.arg[1] = response_body
';
}
location ~ ^/plesk-site-preview/(.*?)/(.*?)/(.*?)$ {
rewrite ^ $uri/ last;
}
}

View File

@@ -0,0 +1,11 @@
location /repair {
alias /opt/psa/admin/repair;
index index.html;
auth_request /repair/backend/auth;
location /repair/backend/ {
proxy_pass http://unix:/run/plesk_repaird.sock:/repair/backend/;
proxy_read_timeout 600;
}
}

View File

@@ -0,0 +1,5 @@
ssl_dhparam /opt/psa/etc/dhparams2048.pem;
ssl_protocols TLSv1.2 TLSv1.3;
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_ciphers EECDH+AESGCM:EECDH+AESCCM:EECDH+CHACHA20:EECDH+ARIAGCM;
ssl_prefer_server_ciphers off;

View File

@@ -0,0 +1,3 @@
location /ui-library {
alias /opt/psa/admin/ui-library;
}

View File

@@ -0,0 +1,27 @@
location /sitebuilder/api {
alias /usr/local/sb/htdocs;
try_files $uri @sitebuilder;
}
location /sitebuilder {
alias /usr/local/sb/htdocs;
index index.php index.html;
try_files $uri $uri/ @sitebuilder;
location ~* /sitebuilder/sites/(.*)/attachments/documents/(.*) {
deny all;
}
location ~* /sitebuilder/(.*)\.php$ {
include /etc/sw-cp-server/fastcgi.conf;
fastcgi_pass unix:/var/run/sw-engine.sock;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
}
location @sitebuilder {
include /etc/sw-cp-server/fastcgi_params;
fastcgi_pass unix:/var/run/sw-engine.sock;
fastcgi_param PATH_INFO /sitebuilder/$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME /usr/local/sb/htdocs/index.php;
}

View File

@@ -0,0 +1,11 @@
location /ws {
proxy_http_version 1.1;
proxy_set_header Upgrade "websocket";
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
proxy_pass http://unix:/run/plesk-web-socket/ws.sock:/;
}

43
etc/sw-cp-server/config Normal file
View File

@@ -0,0 +1,43 @@
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"'
"'$fastcgi_script_name' '$fastcgi_path_info' '$document_root'";
sendfile on;
reset_timedout_connection on;
#keepalive_timeout 0;
keepalive_timeout 65;
#tcp_nodelay on;
#gzip on;
#gzip_disable "MSIE [1-6]\.(?!.*SV1)";
server_tokens off;
fastcgi_max_temp_file_size 0;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_pass_header X-Accel-Buffering;
fastcgi_read_timeout 600;
fastcgi_send_timeout 600;
client_max_body_size 2048m;
error_page 497 https://$hostname:$server_port$request_uri;
include /etc/sw-cp-server/conf.d/*.conf;
}

View File

@@ -0,0 +1,29 @@
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REQUEST_SCHEME $scheme;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
# https://httpoxy.org/
fastcgi_param HTTP_PROXY "";

View File

@@ -0,0 +1,28 @@
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REQUEST_SCHEME $scheme;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
# https://httpoxy.org/
fastcgi_param HTTP_PROXY "";

103
etc/sw-cp-server/koi-win Normal file
View File

@@ -0,0 +1,103 @@
charset_map koi8-r windows-1251 {
80 88 ; # euro
95 95 ; # bullet
9A A0 ; # &nbsp;
9E B7 ; # &middot;
A3 B8 ; # small yo
A4 BA ; # small Ukrainian ye
A6 B3 ; # small Ukrainian i
A7 BF ; # small Ukrainian yi
AD B4 ; # small Ukrainian soft g
AE A2 ; # small Byelorussian short u
B0 B0 ; # &deg;
B3 A8 ; # capital YO
B4 AA ; # capital Ukrainian YE
B6 B2 ; # capital Ukrainian I
B7 AF ; # capital Ukrainian YI
B9 B9 ; # numero sign
BD A5 ; # capital Ukrainian soft G
BE A1 ; # capital Byelorussian short U
BF A9 ; # (C)
C0 FE ; # small yu
C1 E0 ; # small a
C2 E1 ; # small b
C3 F6 ; # small ts
C4 E4 ; # small d
C5 E5 ; # small ye
C6 F4 ; # small f
C7 E3 ; # small g
C8 F5 ; # small kh
C9 E8 ; # small i
CA E9 ; # small j
CB EA ; # small k
CC EB ; # small l
CD EC ; # small m
CE ED ; # small n
CF EE ; # small o
D0 EF ; # small p
D1 FF ; # small ya
D2 F0 ; # small r
D3 F1 ; # small s
D4 F2 ; # small t
D5 F3 ; # small u
D6 E6 ; # small zh
D7 E2 ; # small v
D8 FC ; # small soft sign
D9 FB ; # small y
DA E7 ; # small z
DB F8 ; # small sh
DC FD ; # small e
DD F9 ; # small shch
DE F7 ; # small ch
DF FA ; # small hard sign
E0 DE ; # capital YU
E1 C0 ; # capital A
E2 C1 ; # capital B
E3 D6 ; # capital TS
E4 C4 ; # capital D
E5 C5 ; # capital YE
E6 D4 ; # capital F
E7 C3 ; # capital G
E8 D5 ; # capital KH
E9 C8 ; # capital I
EA C9 ; # capital J
EB CA ; # capital K
EC CB ; # capital L
ED CC ; # capital M
EE CD ; # capital N
EF CE ; # capital O
F0 CF ; # capital P
F1 DF ; # capital YA
F2 D0 ; # capital R
F3 D1 ; # capital S
F4 D2 ; # capital T
F5 D3 ; # capital U
F6 C6 ; # capital ZH
F7 C2 ; # capital V
F8 DC ; # capital soft sign
F9 DB ; # capital Y
FA C7 ; # capital Z
FB D8 ; # capital SH
FC DD ; # capital E
FD D9 ; # capital SHCH
FE D7 ; # capital CH
FF DA ; # capital hard sign
}

View File

@@ -0,0 +1,99 @@
types {
text/html html htm shtml;
text/css css;
text/xml xml;
image/gif gif;
image/jpeg jpeg jpg;
application/javascript js;
application/atom+xml atom;
application/rss+xml rss;
text/mathml mml;
text/plain txt;
text/vnd.sun.j2me.app-descriptor jad;
text/vnd.wap.wml wml;
text/x-component htc;
image/avif avif;
image/png png;
image/svg+xml svg svgz;
image/tiff tif tiff;
image/vnd.wap.wbmp wbmp;
image/webp webp;
image/x-icon ico;
image/x-jng jng;
image/x-ms-bmp bmp;
font/woff woff;
font/woff2 woff2;
application/java-archive jar war ear;
application/json json;
application/mac-binhex40 hqx;
application/msword doc;
application/pdf pdf;
application/postscript ps eps ai;
application/rtf rtf;
application/vnd.apple.mpegurl m3u8;
application/vnd.google-earth.kml+xml kml;
application/vnd.google-earth.kmz kmz;
application/vnd.ms-excel xls;
application/vnd.ms-fontobject eot;
application/vnd.ms-powerpoint ppt;
application/vnd.oasis.opendocument.graphics odg;
application/vnd.oasis.opendocument.presentation odp;
application/vnd.oasis.opendocument.spreadsheet ods;
application/vnd.oasis.opendocument.text odt;
application/vnd.openxmlformats-officedocument.presentationml.presentation
pptx;
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
xlsx;
application/vnd.openxmlformats-officedocument.wordprocessingml.document
docx;
application/vnd.wap.wmlc wmlc;
application/wasm wasm;
application/x-7z-compressed 7z;
application/x-cocoa cco;
application/x-java-archive-diff jardiff;
application/x-java-jnlp-file jnlp;
application/x-makeself run;
application/x-perl pl pm;
application/x-pilot prc pdb;
application/x-rar-compressed rar;
application/x-redhat-package-manager rpm;
application/x-sea sea;
application/x-shockwave-flash swf;
application/x-stuffit sit;
application/x-tcl tcl tk;
application/x-x509-ca-cert der pem crt;
application/x-xpinstall xpi;
application/xhtml+xml xhtml;
application/xspf+xml xspf;
application/zip zip;
application/octet-stream bin exe dll;
application/octet-stream deb;
application/octet-stream dmg;
application/octet-stream iso img;
application/octet-stream msi msp msm;
audio/midi mid midi kar;
audio/mpeg mp3;
audio/ogg ogg;
audio/x-m4a m4a;
audio/x-realaudio ra;
video/3gpp 3gpp 3gp;
video/mp2t ts;
video/mp4 mp4;
video/mpeg mpeg mpg;
video/quicktime mov;
video/webm webm;
video/x-flv flv;
video/x-m4v m4v;
video/x-mng mng;
video/x-ms-asf asx asf;
video/x-ms-wmv wmv;
video/x-msvideo avi;
}