Setup Guide to install Fusio with Nginx?

247 views
Skip to first unread message

bi...@abinfo.de

unread,
Feb 16, 2021, 8:06:45 AM2/16/21
to Fusio
Hallo,

multiple days I have tried to install Fusio on an VPS with Ubuntu and Nginx - without success. Now I have given up.
Only manual step to create database schema on my own MySQL server works as expected. Creation of administrative user seems also to work. But there is no backend available in the apps folder.
I'm not an IT expert and have not deep knowledge.

Searching for an easy-to-use open-source solution for API management and thought Fusio could be the right one.

Is there a chance, that a setup guide for Nginx will be available soon - saw that others are also waiting for it?

Best regards, Andreas

Christoph Kappestein

unread,
Feb 16, 2021, 4:19:05 PM2/16/21
to Fusio
Hi Andreas,

currently we have the following documentations s. https://fusio.readthedocs.io/en/latest/basic/installation.html#setup
Since we mostly use Apache via Docker we dont have currently an explicit Nginx documentation but it should be also easy possible, since Fusio has no special requirements.
Maybe you can take a look at the Symfony examples s.

But we also plan to add a documentation regarding Nginx. Regarding the installation, please let us know where you have experienced problems so that we can
improve our documentation.

best regards
Christoph

bi...@abinfo.de

unread,
Feb 18, 2021, 5:23:30 AM2/18/21
to Fusio
Hi Christoph,

have set up my server from scratch, installed Nginx and php7.4 modules. Now have done a new try with standard settings (not as the 1st time when I have created a separate site and used a self-signed certificate to direcly using https). Now the install.php seems to work generally. Steps 1-3 pass successfully but it stopped at step 4 with the following error:

Error_install-php_step4.png


Is it correct that $homeDir points to /var/www folder and the token should be stored there?
Should I give the www-data user permissions on this folder (I have given them permissions below /var/www/html by now)?

Best regards
Andreas

bi...@abinfo.de

unread,
Feb 18, 2021, 7:15:51 AM2/18/21
to Fusio
Hi Christoph,

after posting the issue at step 4 of the install.php I have made www-data owner of /var/www/html too. Now this step has been passed successfully. Next issue occurs now at step 5:

Error_install-php_step6.png


I fear when installing backend app later also steps 7-8 are still missing.
Any idea how I can fix error with class "ZipArchive"?

Best regards
Andreas

bi...@abinfo.de

unread,
Feb 18, 2021, 7:25:29 AM2/18/21
to Fusio
Hi,

have found solution myself: install php zip module 😉
Now the install.php completed successfully 👍

Best regards
Andreas

bi...@abinfo.de

unread,
Feb 18, 2021, 9:30:27 AM2/18/21
to Fusio
Hi Christoph,

generally the installation now looks fine. Have also downloaded the last master version of the backend-scripts.
But the authentication issue still exists (as posted in git by other users). Hopefully there is a solution soon available.

Best regards
Andreas

Christoph Kappestein

unread,
Feb 18, 2021, 2:02:45 PM2/18/21
to Fusio

Hi Andreas,

in general the problems regarding the login should be resolved with the latest 2.0.1 version. Could you check at the index.html file of the backend that the ${API_URL} is correctly substituted with the Fusio API url, normally this is done automatically on installation but since your installation has failed it was probably not replaced.

best regards
Christoph

bi...@abinfo.de

unread,
Feb 19, 2021, 5:45:38 AM2/19/21
to Fusio
Hi Christoph,

thanks a lot for your support. Now I could solve all my current issues. Here some important information (maybe helpful for others):
  • When downloading fusio-apps-backend directly from Github and store it in the apps/fusio folder the index.html has to be substituted as you mentioned: Replacing the ${API_URL}. Example:
    fusioProvider.setBaseUrl('http://base-url/index.php/');

  • Alternatively found out, that using the marketplace installation procedure directly sets the value correct:
    php bin/fusio marketplace:install fusio

  • Addionally for Nginx I had to adapt the configuration file a bit different to the Symfony example of your first answer to this post:
    try_files $uri $uri/ /index.php$is_args$args;

At lease for the momemt I'm happy that Fusio now is running successfully on my own VPS with Nginx 😁.
My next challenge is to move the installation to a separate site (currently have used the default) and to integrate a certificate to improve security by using https.

Best regards
Andreas

Christoph Kappestein

unread,
Feb 19, 2021, 2:43:08 PM2/19/21
to Fusio
Hi Andreas,

great to hear that the installation now works. If you have any questions or ideas regarding Fuiso please let me know.

best regards
Christoph

bi...@abinfo.de

unread,
Feb 22, 2021, 5:29:24 AM2/22/21
to Fusio
Hi Christoph,

have now also moved Fusio to a separate Nginx site and installed a certificate by Certbot successfully.
After adapting the base url in the index.php of the backend app form http to https the login works again🙂

Best regards
Andreas

Patrick Riviere

unread,
Mar 27, 2021, 2:23:17 PM3/27/21
to Fusio
Do you know when this documentation will be added? I have still some trouble to install fusio with nginx.
My last install with apache on VPS was a drama, but I cannot follow the steps to make this work with nginx.

Thanks, for your help,

Patrick

Christoph Kappestein

unread,
Mar 28, 2021, 5:57:30 AM3/28/21
to Fusio
Hi Patrick,

Iam currently really busy so I have not the time to write such an article but maybe Andreas could help you, it looks like he has a working Nginx configuration.
As mentioned https://symfony.com/doc/current/setup/web_server_configuration.html#nginx is probably a good starting point.
Also everyone is welcome to create a PR with a short description at https://github.com/apioo/fusio/blob/master/doc/setup/nginx.rst so please
let me know if someone wants to create such an article.

best regards
Christoph

Andi Biker

unread,
Mar 29, 2021, 3:35:03 AM3/29/21
to Fusio
Hi Patrick, hi Christoph,

hopefully in the next days I have some time to document my experience with installing fusio on nginx and share thist with you.

Best regards
Andreas
Message has been deleted

vinit furia

unread,
May 3, 2021, 6:43:07 AM5/3/21
to Fusio
I have a working instance on NGINX but would someone be greatful enough for helping me with directives for redirection as nginx doesnt use .htaccess file system.
Kindly if possible please help me out with redirection.
I have made it work with api but documentation /developer account/Swagger are not working. As it always passes to public folder

John Lirac

unread,
Oct 19, 2022, 11:23:46 PM10/19/22
to Fusio
Hi vinit! Have you had workaround here? I am having same issue
Reply all
Reply to author
Forward
0 new messages