Using domain name to access the site under Windows

If you need to access the security CMS site using a domain name under Windows, you need to rely onNginx. If not necessary, there is no need to go through the trouble.

If you are running AnQi CMS locally and pushing static files to the server to use as a static website, please follow the steps below.

  1. In PHPStudy, start Nginx, switch to the website tab, and create a website. Fill in the domain name in the domain column, such asdev.anqi.comThe root directory should be left as the default generated one, do not check the checkbox.PHPNo need to fill in other places. Click Confirm to complete the site creation.
  2. Switch to the Settings tab, switch to the configuration file, findvhosts.confTab, find the corresponding configuration file in the list, such as the one just generateddev.anqi.com_80Click to open.
  3. ModifyrootAdd,/publicResult:
root   "C:/phpstudy_pro/WWW/dev.anqi.com/public";
  1. Foundlocation /, Add the pseudo-static configuration of AnQin CMS before it:
        location @AnqiCMS {
            proxy_pass http://127.0.0.1:8001;
            proxy_set_header   Host             $host;
            proxy_set_header   X-Real-IP        $remote_addr;
            proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
        }

Inlocation /the next line, add the following configuration:

try_files $uri $uri/index.html @AnqiCMS;

Deletelocation /The default configuration of the second last line:

include C:/phpstudy_pro/WWW/dev.anqi.com/public/nginx.htaccess;

Return to the PhpStudy homepage, restart Nginx, and a new site is set up. Open the domain name in the browser.

Start installing AnQi CMS

Copy the installation package to the root directory of the websiteC:/phpstudy_pro/WWW/dev.anqi.comAnd extract it. Double-click to runanqicms.exeEnter the database information in the installation interface of the opened browser, as this time a domain name has been set, so fill in the network address in the URL fieldhttp://dev.anqi.comand click the install button.