Baidu Cloud Hosting BCH project to deploy multiple vue

NOTE: This article uses Baidu Cloud Hosting BCH web server kernel with Nginx, PHP version 7.0.

Step: php then arranged in the arranged URL_MODEL 2, rewrite mode;

Step Two: Create a new file in the root directory of the site bcloud_nginx_user.conf inside (under webroot directory) (bch is not allowed to modify the base configuration files, so only by loading user-defined configuration file), write the following code:

location /hehe {
    if (!-e $request_filename) {
        rewrite .* /hehe/index.php last;
    }
}

Code to achieve the above point does not exist in the file 'hehe' directory, is redirected to a file /hehe/index.php

The third step: start-stop site found in the Hosting Control Panel, click reload site services. (Remember that after you modify the rules must be reloaded or can not take effect)

More vue project deployment remains in effect here

location /hehe {
    if (!-e $request_filename) {
        rewrite .* /hehe/index.php last;
    }
}
location /website_admin {
    if (!-e $request_filename) {
        rewrite .* /website_admin/index.html last;
    }
}
location /website {
    if (!-e $request_filename) {
        rewrite .* /website/index.html last;
    }
}

Nginx configuration file loading process

The system will automatically start and load bcloud_nginx_gen.conf bcloud_nginx_user.conf profile:

bcloud_nginx_gen.conf file is app.conf file conversion.

bcloud_nginx_user.conf user-defined profiles. The user can program in the root directory, create bcloud_nginx_user.conf file, write custom configuration file. BCH below the level of support for server custom configuration.

When duplicate configuration, bcloud_nginx_user.conf higher priority than bcloud_nginx_gen.conf.

Common rules pseudo-static procedures Baidu Cloud

http://z.admin5.com/index.php?r=index/rewrite

Guess you like

Origin www.cnblogs.com/linfblog/p/12123367.html