Jexus 5.8.2 is officially released to provide platform support for Asp. Net Core to enter the production environment. jexus5.8.2

Source: Internet
Author: User
Tags install openssl

Jexus 5.8.2 is officially released to provide platform support for Asp. Net Core to enter the production environment. jexus5.8.2

Jexus is a WEB server and reverse proxy server running on the Linux platform, featuring high security and high performance. It supports ASP. NET and PHP. The latest version 5.8.2 has been released and has the following updates:

1. Now HTTPS has been deployed on most websites, and everyone is paying more and more attention to security. In line with the trend, HTTPS multi-certificate support is added. Each website can be configured with its own independent SSL certificate, now there are two ways to support website deployment HTTPS.

A. Add the SSL configuration used by the server. If necessary, add an ssl configuration to share the configurations for all websites that do not separately Configure ssl, it provides convenience for certificates that support wildcard domain names.
Modify the "CertificateFile" and "CertificateKeyFile" items in jws. conf, and fill in the certificate file and private key file (absolute path) respectively ).
B. Add SSL configuration for the specified website by modifying the website configuration file as "ssl. certificate and ssl. enter the Certificate file and private key file (absolute path) in the certificatekey entry ).
Note 1: When the website enables https, the port must be set to 443, And the UseHttps value is set to true.
NOTE 2: Jexus Https must be supported by the libssl function library. If your server does not have the libss. so. xxx file, you must install openssl.
For the general version, register libssl to/usr/etc/mono/config and add a line to this file (assuming that the libssl file name is "libssl. so.1.0.0 "):
"<Dllmap dll =" libssl "target ="/lib/x86_64-linux-gnu/libssl. so.1.0.0 "/>"
For an independent version, you only need to connect libssl to the jexus runtime/lib folder, for example:
"Sudo ln-s // lib/x86_64-linux-gnu/libssl. so.1.0.0/usr/jexus/runtime/lib/libssl. so"

NOTE 3: If an SSL certificate is provided for the website separately, the domain name entered in the hosts entry of the website must be consistent with the domain name supported by the SSL certificate.

2. added the AppHost (HTTP self-Host application manager) configuration item for Asp.net Core and Node. the management and high-speed data forwarding of Self-host applications such as js and Tomcat provide the same synchronization management and high availability as site operations for the Self-host service program. port (application Port forwarding) provides multi-Port support.

3. Enable the KEEP connection reuse mechanism of FastCGI to further improve the data exchange performance with Fast CGI processing programs such as PHP.

4. Complete the WebSockets Close method.

6. Added support for the http patch method.

7. Fixed the data incomplete BUG when using Https to POST data to fastcgi or reverse proxy.

8. the concurrent processing speed of static files is increased by about 14%.

The highlight of this version is the addition of the "AppHost" configuration item, the HTTP self-Host application (such as Asp.net Core application, Node. js applications) are centrally incorporated into the Jexus working process sequence for control (start, stop, restart, automatic recovery after crash and other management and monitoring functions), Asp. net Core applications enter the enterprise production environment to provide a powerful platform guarantee. Advantages of integrating asp.net core with jexus:

1) supports multiple sites. The same port can support any multiple asp.net core applications at the same time;
2) the startup, stop, and restart operations of an application are the same as those of the site. You do not need to manually manage the asp.net core application;
3) It has the automatic restart function after the application crashes, ensuring uninterrupted enterprise operation;
4) it has a higher performance advantage than reverse proxy.

5) provide the same HTTP environment parameters as IIS.

The configuration format of the AppHost is:
AppHost = {CmdLine = Application Command Line; AppRoot = application working directory; Port = Application HTTP listening Port}, where:
"CmdLine" indicates the command line for starting the application, such as dotnet/var/www/site1/app. dll;
"AppRoot" indicates the working directory of the application, for example,/var/www/site1;
"Port" indicates the listening Port used by the HTTP application, for example, 5000 (the default Port of Asp. Core is 5000 ).

For example, assume that Asp. the path where the Net Core application is stored is "/var/www/mysite", and the Startup Program is stored in this folder named "webapp ", the listening port after the program starts is 5000, so the AppHost configuration should be:
AppHost = {export line =/var/www/mysite/webapp; AppRoot =/var/www/mysite; port = 5000}

The following example describes how to configure the ASP. Net Core + Jexus runtime environment for Centos.

Install. net core 2015 with Visual Studio 1.1 Update 3, create an asp.net core project, and place my code in the https://github.com/geffzhang/AspNetCoreStarted

Install jexus5.8.2 (recommended)

cd /tmpwget linuxdot.net/down/jexus-5.8.2-x64.tar.gztar zxvf jexus-5.8.2-x64.tar.gzcd jexus/cd siteconf/vi default
 
Add AppHost
 

Format: AppHost = {production line = life line; AppRoot = working path; Port = Port}
Note: required line: required. Indicates the command to start the web application (including parameters), such as using line = dotnet/var/www/aspnetcore/AspNetCoreStarted. dll
AppRoot: required. Indicates the working directory of the application, such as AppRoot =/var/www/aspnetcore.
Port: Optional. Indicates the listening port of the application. multiple ports are separated by commas. port or reproxy. Otherwise, the request data cannot be forwarded to the application ).
Env: Optional. Environment variables required for the application to work, such as env = (PATH =/usr/local/bin:/var/www/aspnetcore: $ PATH ), multiple settings are separated by commas.
ErrLog: Optional. Redirects the abnormal output of this application to the specified file (complete path is required). If you do not want to output logs, you do not need to use the OutLog item. At this time, jexus will automatically turn off the console output (actually redirected to/dev/null );
OutLog: Optional. Redirects the console output of the application to the specified file (complete path is required );
User: Optional. Run the application as a specified user. The default identity is root.
Note:
1. Like AppHost. Port, AppHost does not support virtual paths;
2. The AppHost function is used to manage the specified web application with http service capabilities in the jexus workflow and Asp. net Core or Node. it is of great significance to use self-host web programs such as js in the production environment.

Try before Jexus takes over to ensure that the application runs normally on the server.


Start the jexus service to take over Application Management

Cd/usr/jexus

./Jws start

Visit our website http: // 52.175.35.6/in a browser /:

Check the log output in the/tmp directory:

We have generated the desired log:

OutLog outputs many logs. When using the product operation environment, the log level should be increased to the err level, which will have fewer records and will not affect the speed, and the performance will be greatly improved if fewer logs are generated. The log level can be set as follows:

Let's take a look at the Jexus and asp.net core processes.

We can see that it is already a sub-process under jexus monitoring.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.