It's no secret that FastReport .NET has broad functionality. It is also a great solution that can be integrated with the Apache 2 web server. Next, we will look at the fine-tuning of Apache2 on the Linux operating system.
First, let's install .NET 5 with a few commands. Download the necessary packages from the Microsoft repository:
Next, install the .NET5 package:
Note. You can prepare your application for Windows, namely, install FastReport.Core.Skia packages and send this project to yourself already on Ubuntu.
With a test install, you do not need X11 for the application to work correctly because it is already installed with apache or on Ubuntu.
Now let's start loading Apache2 with the following command:
If it is successful, then proceed to the next step. Next, we are going to manage the Apache service or its reboot and shutdown. Remember that with any change in Apache, for example, when changing the config or when enabling any settings, you will need to run the following commands:
Apache is configured to start automatically when the server boots. If you don't want this, disable this with the following command:
To reload the start service during boot time, type:
Now we will set up virtual hosts. It means that if you go to localhost:80, you will be automatically redirected to localhost:5000.
For everything to work correctly, it is necessary to enable some modules:
Next, go to the automatically created folder when installing Apache:
Now we create a file with your config and immediately edit it:
You need to add the following lines to the file:
Note: If you go to localhost:80, then you will be automatically redirected to localhost:5000
After creating the config file, activate it and disable the default config:
To publish the project, you will need the following command:
Next, go to the publish folder. You will see all dlls with a project name using the ls command.
The project is started with the following command:
Restart Apache with the previously launched FastReport.Core.Web.Net5 application and go to the virtual host specified in Apache. Namely, on localhost:80, and see that it automatically redirects to localhost:5000.
If it was successful, congratulations! You have successfully configured Apache2 for FastReport .NET. If you have any questions, write to our support at email@example.com.