diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index f746ced85..846552c6e 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -15,4 +15,4 @@ jobs: with: check_filenames: true check_hidden: true - skip: .git,.gitignore,./rootfs/nftd,./src/vendor + skip: .git,.gitignore,./rootfs/app/nftd,./src/vendor diff --git a/.github/workflows/update-and-lint.yml b/.github/workflows/update-and-lint.yml index 5f9cc24f1..6bda6db51 100644 --- a/.github/workflows/update-and-lint.yml +++ b/.github/workflows/update-and-lint.yml @@ -20,9 +20,9 @@ jobs: cd src - name: update run: | - curl -L https://unpkg.com/xregexp/xregexp-all.js -o rootfs/nftd/xregexp-all.js - curl -L https://unpkg.com/showdown/dist/showdown.min.js -o rootfs/nftd/showdown.min.js - curl -L https://code.jquery.com/jquery-"$(git ls-remote --tags https://github.com/jquery/jquery | cut -d/ -f3 | sort -V | tail -1)".min.js -o rootfs/nftd/jquery.min.js + curl -L https://unpkg.com/xregexp/xregexp-all.js -o rootfs/app/nftd/xregexp-all.js + curl -L https://unpkg.com/showdown/dist/showdown.min.js -o rootfs/app/nftd/showdown.min.js + curl -L https://code.jquery.com/jquery-"$(git ls-remote --tags https://github.com/jquery/jquery | cut -d/ -f3 | sort -V | tail -1)".min.js -o rootfs/app/nftd/jquery.min.js - name: nginxbeautifier run: | yarn global add nginxbeautifier diff --git a/rootfs/nftd/addNginxFancyIndexForm.js b/rootfs/app/nftd/addNginxFancyIndexForm.js similarity index 100% rename from rootfs/nftd/addNginxFancyIndexForm.js rename to rootfs/app/nftd/addNginxFancyIndexForm.js diff --git a/rootfs/nftd/footer.html b/rootfs/app/nftd/footer.html similarity index 100% rename from rootfs/nftd/footer.html rename to rootfs/app/nftd/footer.html diff --git a/rootfs/nftd/header.html b/rootfs/app/nftd/header.html similarity index 100% rename from rootfs/nftd/header.html rename to rootfs/app/nftd/header.html diff --git a/rootfs/nftd/jquery.min.js b/rootfs/app/nftd/jquery.min.js similarity index 100% rename from rootfs/nftd/jquery.min.js rename to rootfs/app/nftd/jquery.min.js diff --git a/rootfs/nftd/showdown.min.js b/rootfs/app/nftd/showdown.min.js similarity index 100% rename from rootfs/nftd/showdown.min.js rename to rootfs/app/nftd/showdown.min.js diff --git a/rootfs/nftd/styles.css b/rootfs/app/nftd/styles.css similarity index 100% rename from rootfs/nftd/styles.css rename to rootfs/app/nftd/styles.css diff --git a/rootfs/nftd/xregexp-all.js b/rootfs/app/nftd/xregexp-all.js similarity index 100% rename from rootfs/nftd/xregexp-all.js rename to rootfs/app/nftd/xregexp-all.js diff --git a/rootfs/usr/local/nginx/conf/conf.d/include/acme-challenge.conf b/rootfs/usr/local/nginx/conf/conf.d/include/acme-challenge.conf index 978f6dcec..3bfa7e8a1 100644 --- a/rootfs/usr/local/nginx/conf/conf.d/include/acme-challenge.conf +++ b/rootfs/usr/local/nginx/conf/conf.d/include/acme-challenge.conf @@ -1,3 +1,7 @@ +location = /.well-known/acme-challenge/ { + return 404; +} + location /.well-known/acme-challenge/ { auth_basic off; auth_request off; @@ -5,16 +9,12 @@ location /.well-known/acme-challenge/ { root /tmp/acme-challenge; } -location = /.well-known/acme-challenge/ { - return 404; -} - location = /nftd { return 301 /nftd/; } location /nftd/ { - alias /nftd/; + alias /app/nftd/; } location ~ /\.ht { diff --git a/rootfs/usr/local/nginx/conf/conf.d/npmplus.conf b/rootfs/usr/local/nginx/conf/conf.d/npmplus.conf index ea29cee23..990060a76 100644 --- a/rootfs/usr/local/nginx/conf/conf.d/npmplus.conf +++ b/rootfs/usr/local/nginx/conf/conf.d/npmplus.conf @@ -15,9 +15,10 @@ server { location / { alias /app/src/public/; + index index.php index.html; location ~ [^/]\.php(/|$) { - fastcgi_pass php; + fastcgi_pass npmplus; fastcgi_split_path_info ^(.+?\.php)(/.*)$; if (!-f $document_root$fastcgi_script_name) { return 404; diff --git a/rootfs/usr/local/nginx/conf/nginx.conf b/rootfs/usr/local/nginx/conf/nginx.conf index fee979deb..7a8eb6925 100644 --- a/rootfs/usr/local/nginx/conf/nginx.conf +++ b/rootfs/usr/local/nginx/conf/nginx.conf @@ -94,7 +94,7 @@ http { server unix:/run/php83.sock; } - upstream php { + upstream npmplus { server unix:/run/php.sock; } diff --git a/src/public/auth/login/index.php b/src/public/auth/login/index.php index 6e07efdbe..78d4b4fc3 100644 --- a/src/public/auth/login/index.php +++ b/src/public/auth/login/index.php @@ -14,7 +14,6 @@ } else { session_unset(); ?> -