R robinrm New Pleskian Oct 20, 2021 #1 Hello, have someone an good instruction for the implementation from SvelteKit in Plesk? Node is already installed but Phusion won't start any websites (Web application could not be started by the Phusion Passenger(R) application server.) Thanks in advance.
Hello, have someone an good instruction for the implementation from SvelteKit in Plesk? Node is already installed but Phusion won't start any websites (Web application could not be started by the Phusion Passenger(R) application server.) Thanks in advance.
R robinrm New Pleskian Mar 19, 2022 #2 The Sollution: create a file in the build folder named index.cjs with the content Code: (() => import('./index.js'))(); as described here on Github. Make shure that you have configured a node adapter for example see the Sveltekit Instructions. After installing the package.json i'm getting the error in Node v.17.7.1 and v16.14.0: npm ERR! code 127 npm ERR! path /var/www/vhosts/mydomain/node_modules/esbuild npm ERR! command failed npm ERR! command sh -c node install.js npm ERR! sh: 1: node: not found npm ERR! A complete log of this run can be found in: npm ERR! /var/www/vhosts/mydomain/.npm/_logs/2022-03-19T14_35_06_846Z-debug-0.log Click to expand... After quick check in the filebrowser all modules were installed correctly. Now point Node to the build/index.cjs und the ducumentspath to /static. After a restart from node your site should no running without any issuses with the sceleton project from Sveltekit!
The Sollution: create a file in the build folder named index.cjs with the content Code: (() => import('./index.js'))(); as described here on Github. Make shure that you have configured a node adapter for example see the Sveltekit Instructions. After installing the package.json i'm getting the error in Node v.17.7.1 and v16.14.0: npm ERR! code 127 npm ERR! path /var/www/vhosts/mydomain/node_modules/esbuild npm ERR! command failed npm ERR! command sh -c node install.js npm ERR! sh: 1: node: not found npm ERR! A complete log of this run can be found in: npm ERR! /var/www/vhosts/mydomain/.npm/_logs/2022-03-19T14_35_06_846Z-debug-0.log Click to expand... After quick check in the filebrowser all modules were installed correctly. Now point Node to the build/index.cjs und the ducumentspath to /static. After a restart from node your site should no running without any issuses with the sceleton project from Sveltekit!
P pierreP New Pleskian Mar 22, 2023 #3 It's very important to add this nginx configuration to avoid security leak : NGINX: location ~ /(server) { deny all; return 404; } See SECURITY - restrict `server` folder in deployment · Issue #9477 · sveltejs/kit
It's very important to add this nginx configuration to avoid security leak : NGINX: location ~ /(server) { deny all; return 404; } See SECURITY - restrict `server` folder in deployment · Issue #9477 · sveltejs/kit
P pierreP New Pleskian Mar 22, 2023 #4 pierreP said: It's very important to add this nginx configuration to avoid security leak : NGINX: location ~ /(server) { deny all; return 404; } See SECURITY - restrict `server` folder in deployment · Issue #9477 · sveltejs/kit Click to expand... Better config : NGINX: location ~ /(server|client|tmp|node_modules|env\.js|handle\.js|shims.js|index\.js) { deny all; return 404; }
pierreP said: It's very important to add this nginx configuration to avoid security leak : NGINX: location ~ /(server) { deny all; return 404; } See SECURITY - restrict `server` folder in deployment · Issue #9477 · sveltejs/kit Click to expand... Better config : NGINX: location ~ /(server|client|tmp|node_modules|env\.js|handle\.js|shims.js|index\.js) { deny all; return 404; }