The best VPN 2022

The Best VPS 2022

The Best C# Book

2021 mvc website deployment Jexus guide mvc website deployment Jexus guide, Recently, I have been working on deploying the mvc website on Jexus to solve some requests from customers. Because the project is composed of a mixed website of webform and mvc, the website is being migrated from the Windows IIS server to Centos Jexus encountered pits that were not, in short, they lay flat one by one.

Before you start, you need to install the Centos server. Because various management operations of the Centos server are performed using the command line (terminal), in order to manage the Centos server more conveniently, you can use aapanel to perform server management operations. mvc website deployment Jexus guide mvc website deployment Jexus guide

Install the aapanel for centos

aapanel is a visual web panel for managing Linux servers. After installing this panel, you can complete server management directly on the browser, such as website deployment, database installation, port opening or disabling, timing tasks, backups, file management, etc.

Chinese official website:
English official website:

I recommend installing the English version, because you don’t need to register an account to use it. When using it for the first time, log in to the Centos server (other servers are similar, such as Ubuntu, Debian, etc.) using a client such as putty, and then execute the following command to install it.

Linux Panel Installation Command

aaPanel is developed based on Centos, we recommend using Centos to install it


yum install -y wget && wget -O && bash mvc website deployment Jexus

The experimental Centos/Ubuntu/Debian/Fedora installation command supports ipv6. Note that this command is executed with root privileges (Centos8 is supported)

curl -sSO && bash

Ubuntu/Deepin :

wget -O && sudo bash

Debian :

wget -O && bash

Note: You must install aapanel for a new system that has not installed other environments such as Apache/Nginx/php/MySQL. It is recommended to install aapanel on a system that uses centos 8.X

After aapanel is installed, there are aapanel’s login entry address, user name, password and other information in the final prompt text. You need to record it, copy it and save it directly. The user name and password can be modified in aapanel. If you forget the user name and password and other information, please use SSH (such as putty) to log in to the server, and execute the following commands to see the login address, user name, password and other information.

View the aapanel login entry, user name, password command:

/etc/init.d/bt default mvc website deployment Jexus mvc website deployment Jexus

Jexus installation

Just install the latest version of Jexus. It should be noted that installing Jexus needs to distinguish between the X86_64 system and the ARM64 system. Like some cloud servers, the ARM64 system may be used, so you need to pay attention. When installing Jexus, execute the following command:

X86_64 system

The command to install the standalone version of jexus is:


ARM64 system

The command to install the standalone version of jexus is:

curl|sh mvc website deployment Jexus

The webform website and mvc website cannot be deployed across platforms. The Jexus installed in the previous step comes with a Linux mono runtime to support .net programs, so you can use the website programs developed by .net Deploy to a Linux server, but it should be noted that Mono does not support the latest .net environment and needs to be downgraded to compile and release. After testing, especially the reference library of mvc, you need to be careful not to use the latest version. The specific reference library and version that can be used are as follows:

MVC reference library version


Other matters needing attention

URL address (route) and static resource address are strictly case sensitive
Does not support sets of applications under virtual directories (to be mentioned separately later)
The file path is based on Linux, Win path such as “D:\” is not supported

Configuration file update

The system.web configuration node is updated to solve the problem of System.Net.Http.

<compilation debug="true" targetFramework="4.7.2">
        <add assembly="System.Net.Http, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</compilation> mvc website deployment Jexus

Set of applications under virtual directory

On the Windows server, the deployment website can nest applications under the virtual directory, as shown in the following figure:

iis web application mvc website deployment Jexus

The uploadserver in the above figure is an application nested into the virtual directory of service. If you want to access the page in uploadserver, the request address is:

After deploying uploadserver to Jexus, if /service/uploadserver this link style is still maintained  , and the website is developed using mvc, there will be a problem that the root directory of the website cannot be located correctly and System.InvalidOperationException an error will be reported . As shown below: mvc website deployment Jexus

To solve this problem, we need to start from two aspects:
First: Configure the website in the Jexus siteconf file, do not configure it  Second-level or two-segment path. The following figure shows the original configuration.

error conf
Jexus deployment webform site

You only need to modify the configuration of the above figure One-level or one-segment path to. As shown below: mvc website deployment Jexus

Second: Configure the reverse proxy, find the root file in the Jexus siteconf and modify it, and add the node as shown in the figure below to perform the reverse proxy.

The one on the left reproxy=/service/uploadserver shows that when the requested address matches , it is actually the address requested by the reverse proxy for the server  . If you configure the nginx reverse proxy, this is not difficult to understand. mvc website deployment Jexus

The reverse proxy can keep the same URL address as before the migration, so there is no need to modify any code to keep the request interface or URL consistent.

Webform deployment considerations

If it is empty or encountered, add it again.

Leave a Comment