Shopify / Shopify/shopify-app-template-php

unable to get depolyed app with apache to wrok

Open
#488 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
340
Forks
108
PR merge metrics
No merged PRs in 30d

Description

Issue summary

Hello, my app works fine in dev environment, I deployed it to my custom vps with apache server. the react front works fine but the backend api calls won't work

Expected behavior

the api calls should work

Actual behavior

the api calls won't work
I get this error : net::ERR_TOO_MANY_REDIRECTS
https://xxxxxxx.com/api/products/count/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/

Steps to reproduce the problem

npm init @shopify/app@latest -- --template php
cd web
composer install
cp .env.example .env
touch storage/db.sqlite
php artisan migrate
php artisan key:generate
cd ..
npm run build --api-key=xxxxxxxxxxxxxxxxxxxx
copy the the app folder to web server
configure apache :
DocumentRoot /var/www//web/public
ErrorLog ...
CustomLog ..
<Directory "/var/www/">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted

restart apache
test app

Reduced test case


Checklist

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the deployment from the listed PHP setup commands and Apache configuration, then inspect how the DocumentRoot, AllowOverride setting, and /api/products/count request produce the repeated index.html redirects. Done means the deployed React frontend can make backend API calls without ERR_TOO_MANY_REDIRECTS.

Written by the indexing model from the issue text.

Assessment

Tech stack
apache, laravel, php
Domain
api, backend, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.