Redirect URL subdir instead of using a vhost

Hi all,

Neth server doesn’t have ibays the way that SMEs did, it has virtual hosts instead.

So where I used to have domainname.com/someapp, now I have to have someapp.domainname.com (which implies SSL cert changes too but I’m hoping that the glue under the bonnet can connect all that up with Let’s Encrypt for me, but I’ll deal with that later…)

Have I got this right? What would be the best way to retain the behaviour where the URL subdirectory defines the PHP app, instead of making a vhost for each webapp?

Thanks!

Sorry I do not see the issue, either use the domain.com of the server in the /var/www/html or use a vhost myapp.domain.com and you access to the webapp by the folder

myapp.domain.com/app

I would go to the second way I always try to use specific vhosts with letsencrypt. The reason to never use the /var/www/html is that it is not included by the default backup system however you can add it

Ah no, there’s no big problem here, but for more context, I have an existing SME server with multiple ibays.

Each ibay creates a sub-site eg http://example.com/cooking or whatever with a php or other app sitting in there. So I and many other people have a bunch of bookmarks and links all over the place so I’m trying to figure out if I can move the apps from vhosts to subdirs or if I should just add redirects. Probably the latter…

Move the ibay in a folder of /var/html/www/app nobody will see the difference once sme will be off

1 Like

Thanks @stephdl!

1 Like