Skip to content
This repository has been archived by the owner on May 1, 2021. It is now read-only.

Running PW in a sub-folder #11

Open
lesaff opened this issue Apr 10, 2020 · 7 comments
Open

Running PW in a sub-folder #11

lesaff opened this issue Apr 10, 2020 · 7 comments

Comments

@lesaff
Copy link

lesaff commented Apr 10, 2020

Hi @thomasaull

Just a note, when running PW as a subfolder, you have to define the API endpoint with the subfolder name. Example, if PW is installed in a cms folder, the endpoint will be cms/api

It took me a few tries to figure this out.

@nwabeen
Copy link

nwabeen commented Jul 11, 2020

Thanks for your help 👍

@sinky
Copy link

sinky commented Jul 25, 2020

How is this done?
My installation is in a subdir called "api/" ... this seams to conflict with the plugins default Endpoint "api"
After installation of this module on a fresh ProcessWire installation i can't access the admin UI or any page anymore.
Only on the start page the the following is displayed:

message": "no endpoint defined"

@lesaff
Copy link
Author

lesaff commented Jul 26, 2020

@sinky set your endpoint to api/api

@nwabeen
Copy link

nwabeen commented Jul 26, 2020

You need to change the endpoint to your installtion subfolder (for your case /api/) in the RestApi configuration page :

  1. Select Modules in menu.
  2. Find RestApi module in the list below and click settings.
  3. Change endpoint here :
    Capture d’écran 2020-07-26 à 16 00 18

if you cant access the admin UI, you can try changing RestApi module settings in PhpMyAdmin.

  1. Select the database connected to your processwire installation.
  2. Select the "modules" table
  3. Find the RestApi row
  4. You can change the RestApi endpoint setting in the data column to api/api

Capture d’écran 2020-07-26 à 16 00 09

@thomasaull
Copy link
Owner

Thanks for helping out @nwabeen 👍

@yannbolliger
Copy link

@thomasaull are you planning on fixing this to have only the additional url-part in the input field?

@thomasaull
Copy link
Owner

thomasaull commented Sep 23, 2020

@yannbolliger Since it's not really working out to keep a good maintenance on this project, I decided (see: https://processwire.com/talk/topic/20006-module-restapi/?do=findComment&comment=204917) to deprecate it in favour of the newly released AppApi module: https://modules.processwire.com/modules/app-api/ Please continue to make any suggestions there.

Personally I think its a good idea to keep the endpoint setting as is. Some people might want to use an endpoint other than api. Also there is a note below the field, which clearly describes the usage in combination with a subdirectory.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants