Where to put my own webapps inside the file structure?

Hi,
I’ve a webapp, developped (not by me, I’m a director/photographer) a long time ago with an index.php, some subfolder and js files.
It’s mainly an interactive app for presenting images, with text in popup.
I want to showcase it on my blog. I’ve created a post, and plan to write a link to this index.php file.

For example, the link could point to something like : https://mydomain/my-post-title//index.php or https://mydomain/demo/demo1/index.php

I have a few other webapp like this, so what I’m looking to is :

  • where should I create this “demo” and “demo/demo1” subfolders in the file structure of Ghost ?

  • where do I specify this custom “route” ? (inside the lab section, by editing the yaml file ?)

(by the way, I use the Casper theme, but don’t see any “Casper” folder in the “theme” subfolder)

Concerning my setup, I’ve installed Ghost 4 with docker, self-hosted on a NAS behind SWAG reverse proxy.
Thanks for your help.

Ghost won’t be able to support your PHP files because PHP is a server-side language.
You’ll need to install PHP, and configure your reverse proxy to route /demo to the PHP backend

Hi @vikaspotluri123 , thank you to take the time to answer this “stupid” question ;-).
I will try to install php in another container for this specific “dynamic” webapp, thanks.

But to gain benefits from your experience and knowledge, what if I just want to display some simple “static HTML file” (and for some reason I don’t want to copy/past this HTML code inside a Ghost page), what would be the way to go ?
Could I create a folder inside the files/folder structure of Ghost, put the index.html files here, and point it from a link as https://mydomain.com/myfolder/index.html ?

Thanks for your help.

If you wanted to host static html, your best bet is to configure it in your reverse proxy (you mentioned SWAG)!

Hi, just to give the solution I’ve found : I’ve deployed another container (php:apache) and simply put my php files inside, and then set the reverse proxy in Swag.
Thanks for your advice ;-)

1 Like