Ecommerce Shopify WordPress Discussion

Deploy Shopify App in Cloudways – Remix Template

Good day, everyone! I have a question regarding Shopify App deployment (remix template) I know that I can deploy it in either Heroku and Fly.io. And from what I read in the documentation, It possible to deploy it in other hosting services. So, right now I am trying to deploy it in Cloudways. But the problem now is that for some reason it is trying to access the default index.php file in Cloudways. Other parts of the app is working like the following: example.com/auth/login it works! example.com/auth/callback it works! example.com/ it does not work ☹️ Which is why I find it weird, why it does not work when the app itself is just an express app calling build/index.js. I checked my pm2 logs, whenever I try to visit the site, it will throw an error mentioning Error: No route matches URL "/index.php". Do note that the index.php is already there when I created an application in Cloudways. For more information, here are some code snippets: server.mjs import { createRequestHandler } from "@remix-run/express"; import express from "express"; // notice that the result of `remix build` is "just a module" import * as build from "./build/index.js"; // port is 4007 const port = process.env.PORT || 4007; const app = express(); app.use(express.static("public")); // and your app is "just a request handler" app.all("*", createRequestHandler({ build })); app.listen(port, () => { console.log(`App listening on http://localhost:${port}`); }); .htaccess RewriteEngine On RewriteBase / RewriteRule ^(.*)?$ http://localhost:4007/$1 [P,L] I would highly appreciate it, if you guys can tell me what am I missing with this? Can I really not deploy my app in Cloudways? I tried contacting Cloudways support, they mentioned: We have a custom stack so it does not support some application types such as python based frame works on ruby on rails and same goes for Shopify, so it cannot work as custom, however, you can do one thing you can launch a direct server on our parent company DigitalOcean and there you can use this custom app. Deploying to other hosting services isn't an option for me, as it is not really cost-effective on my end. If it is really impossible, any advice on how to approach this problem?
I have found a solution for this. For anyone trying to deploy their shopify remix app, you guys can just do the following: Just add DirectoryIndex disabled to your .htaccess file. This should prevent it from trying to access the default index.php file. DirectoryIndex disabled RewriteEngine On RewriteBase / RewriteRule ^(.*)?$ http://localhost:4007/$1 [P,L] If you guys have a better solution than this, please feel free to post it here.

February 17, 2024

TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.