Running servers for local development - CMS_ALIAS?

Recently, I am following advices from this post to build up my application with xibo. Below picture summarizes the idea.


Basically, one route /laravel/ to my application while /xibo/ to the xibo application.

For the xibo route, I am relying on the built-in feature CMS_ALIAS to do the job. But, I have following questions regarding on this feature. In other words, xibo rely on this variable to provide the ALIAS function. Then, I have following questions

Q1: Why CMS_ALIAS is not enforced in development mode?

According to the, the critical ALIAS configuration is only applied in non development mode.

Although comments address the reasons for excluding them, any suggestions for me if I really want to have the alias on development, and avoid the problem addressed in the comment?

Q2: Is it possible to change the root url only?

Actually, I do want to route with following, from /xibo/ to / such that xibo is kind of starts at the root to avoid the issue. But, according to my another bug report, the root URI relies on CMS_ALIAS. Are there any way for me to configure the ROOT URL to something without modifying the apache configuration inside the docker container?

DOMAIN/xibo --- (apache) --> XIBO_CONTAINER/

Q3: What are the Rewrite rules in xibo-cms\web\.htaccess served for?

In recent implementation from Factory/ContainerFactory.php, it should figure out the basePath from SCRIPT_NAME & REQUEST_URI. Why do we still need the rewrite rule in .htaccess?


  • 20210907: Add Q3

Sorry for the delay replying to this topic - you may have solved this yourself by now, but its useful to have a reply anyway.

We didn’t think anyone would ever want to develop Xibo under an alias. Its quite uncommon I think to mix your production environment requirements (the separate paths in the same URL) with your development requirements.

If I were to approach this problem, I would have my development, test and production URLs configurable at the application level and then have:

I’d leave out the reverse proxy completely for development as it is an unnecessary complication.

Just as a side note, for production, in my experience, you’d be much better having separate domains instead of folders. If you ever need to scale out your Xibo installation you will really feel the benefit of having it on its own sub domain and being severed completely separately to your Laravel app.

These are to rewrite the application entry points - so /api/ goes to /web/api/index.php etc.

Unless you are developing things inside Xibo - custom widgets, middleware, etc - you shouldn’t really need to change the Xibo config at all. In fact, I would recommend using a production Xibo Docker installation and not the development doc.

I hope this is useful for you.