{"id":15651720,"url":"https://github.com/pi0/nuxt-plesk-example","last_synced_at":"2025-04-30T20:05:14.297Z","repository":{"id":76840893,"uuid":"154331274","full_name":"pi0/nuxt-plesk-example","owner":"pi0","description":null,"archived":false,"fork":false,"pushed_at":"2018-10-23T23:16:11.000Z","size":198,"stargazers_count":33,"open_issues_count":2,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-30T20:03:52.836Z","etag":null,"topics":["iis","iisnode","node","nuxt","plesk","plesk-onyx","ssr"],"latest_commit_sha":null,"homepage":null,"language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pi0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["pi0"]}},"created_at":"2018-10-23T13:18:05.000Z","updated_at":"2024-08-27T10:30:19.000Z","dependencies_parsed_at":"2024-03-24T06:15:20.934Z","dependency_job_id":null,"html_url":"https://github.com/pi0/nuxt-plesk-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pi0%2Fnuxt-plesk-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pi0%2Fnuxt-plesk-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pi0%2Fnuxt-plesk-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pi0%2Fnuxt-plesk-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pi0","download_url":"https://codeload.github.com/pi0/nuxt-plesk-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251774895,"owners_count":21641731,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["iis","iisnode","node","nuxt","plesk","plesk-onyx","ssr"],"created_at":"2024-10-03T12:39:53.718Z","updated_at":"2025-04-30T20:05:14.244Z","avatar_url":"https://github.com/pi0.png","language":"Vue","funding_links":["https://github.com/sponsors/pi0"],"categories":[],"sub_categories":[],"readme":"# Nuxt on Plesk  Onyx\n\nYou have to first download and set up a Plesk server. It is downloadable from [this](https://page.plesk.com/plesk-onyx-free-download) link. This guide is using the Docker-based method. If you prefer to or already have a Plesk server, you may have to take a look at [here](https://www.plesk.com/blog/product-technology/node-js-plesk-onyx) for Node extension installing instructions.\n\n## Setup plesk\n\nRun Plesk server:\n\n```\ndocker run -d -it -p 80:80 -p 443:443 -p 8880:8880 -p 8443:8443 -p 8447:8447 plesk/plesk\n```\n\nNew head to http://localhost:8880 for admin panel.\n\nWait until server is setup.\n\n![image](https://user-images.githubusercontent.com/5158436/47363690-3ed78780-d6e4-11e8-8ae9-76dc6b3c29da.png)\n\nNow you can log in with default conditionals `admin`/`changeme`.\n\n![image](https://user-images.githubusercontent.com/5158436/47363759-71818000-d6e4-11e8-839b-24ad37a11cab.png)\n\n## Add a new domain\n\nAfter logging in, switch to \"Power User View\" (Bottom left)\n\n\nClick on \"Add a Domain\" to define a new domain:\n\nIn this tutorial, I use `nuxt.127.0.0.1.xip.io` as Plesk is running on my laptop.\n\nIf you have a version control, you may prefer to enable \"Git support\". For this demo I use a simple hello-world repository:\n\n\u003e https://github.com/pi0/nuxt-plesk-example.git\n\n\nNow from \"Websites and Domains\" tab, open \"Node.js\":\n\n## Enable and set Node params\n\nSet this params:\n\nNode.js Version: `8.9.3` (Or later)\nDocument Root: `/httpdocs/static`\nApplication Root: `/httpdocs`\n\nClick on \"Enable Node.js\"\n\nClick on \"NPM Install\"\n\n![image](https://user-images.githubusercontent.com/5158436/47364375-020c9000-d6e6-11e8-861a-15388e3738bd.png)\n\n ## Development\n\n![image](https://user-images.githubusercontent.com/5158436/47366947-8f9eae80-d6eb-11e8-9294-fc08c97f669b.png)\n\nClick on restart app and head to http://nuxt.127.0.0.1.xip.io! Voila.\n\n![image](https://user-images.githubusercontent.com/5158436/47367007-a8a75f80-d6eb-11e8-9d9c-d0a1610d0345.png)\n\n## Production\n\nSet params like below:\n\n![image](https://user-images.githubusercontent.com/5158436/47367570-cc1eda00-d6ec-11e8-84e5-a1bcab4c3812.png)\n\nYou should have a file called `server.js` in the root of your project like this: \n\n```js\nconst express = require('express');\nconst { Nuxt, Builder } = require('nuxt');\n\nconst config = require('./nuxt.config.js');\n\n// Create new express app\nconst app = express();\n\n// Listen to port 3000 or PORT env if provided\napp.listen(process.env.PORT || 3000);\n\n// Enable production mode\nconfig.dev = false;\n\n// Create instance of nuxt\nconst nuxt = new Nuxt(config);\n\n// Add nuxt middleware\napp.use(nuxt.render);\n```\n\nIf you prefer to automatically build upen server start (Not recommanded), then appennd line(s) below:\n\n```js\nnew Builder(nuxt).build()\n```\n\nIf you don't prefer to build upon start, use \"Run Script\" tool to manually trigger a build:\n\n\u003e build --scripts-prepend-node-path\n\n![image](https://user-images.githubusercontent.com/5158436/47367448-8bbf5c00-d6ec-11e8-8e3a-2a81c8ee01ec.png)\n\n\nIf you prefer to automatically build upon server start (Not recommended), then append line(s) below:\n\n```js\nnew Builder(nuxt).build().catch(err =\u003e {\n  console.error(err);\n  process.exit(1);\n});\n```\n\n## Windows / IISNode\n\nWindows deployment is a little bit different by design with Plesk.\n\nGo into \"Websites \u0026 Domains\" \u003e \"Hosting Settings\" and ensure that \"Document Root\" is set to `httpdocs` (Or where you clone your project. Not the ~~`httpdocs/dist`~~ folder)\n\n![image](https://user-images.githubusercontent.com/5158436/47394041-4b80cd80-d72e-11e8-93b9-27e744b7d82c.png)\n\nGo into Node.js settings and ensure that **BOTH** \"Document Root\" and \"Application Root\" are pointing to `/httpdocs`. They should be the same.\n\n![image](https://user-images.githubusercontent.com/5158436/47394114-86830100-d72e-11e8-8fa7-d9ae30df06e6.png)\n\nUsing file manager's \"Change Permissions\" ensure that \"Application pool group\" has all permissions on `/httpdocs` directory. This is required for when we run build inside `server.js`.\n\n![image](https://user-images.githubusercontent.com/5158436/47394201-f4c7c380-d72e-11e8-8aed-378ae7cae375.png)\n\nCreate a file called `web.config` inside `/httpdocs`:\n\n```xml\n\u003cconfiguration\u003e\n  \u003csystem.webServer\u003e\n    \u003crewrite\u003e\n      \u003crules\u003e\n        \u003crule name=\"server\"\u003e\n          \u003cmatch url=\"/*\" /\u003e\n          \u003caction type=\"Rewrite\" url=\"server.js\" /\u003e\n        \u003c/rule\u003e\n      \u003c/rules\u003e\n    \u003c/rewrite\u003e\n  \u003c/system.webServer\u003e\n\u003c/configuration\u003e\n```\n\nPlesk node windows support is not so great. Please check `/logs/iisnode` for logs. \n\nMore info about iisnode: https://github.com/Azure/iisnode\n\n## Nuxt.js\n\nFor detailed explanation on how Nuxt.js things work, checkout [Nuxt.js docs](https://nuxtjs.org).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpi0%2Fnuxt-plesk-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpi0%2Fnuxt-plesk-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpi0%2Fnuxt-plesk-example/lists"}