Accessing a site using a domain name under Windows

If you need to use a domain name to access the Anqi CMS site under Windows, you need to use the helpNginx, if it is not necessary, there is no need to make trouble.

If you are running CMS locally and pushing static files to the server as a static website, please follow the following method.

  1. In PHPStudy, start Nginx, switch to website Tab, and create a website. Fill in the domain name column, such asdev.anqi.com, just press the default generated root directory, uncheckPHP, no need to fill in other places. Click Confirm to complete the site creation.
  2. Switch to Settings Tab, switch to configuration file, findvhosts.confTab, find the corresponding configuration file in the list, such as the newly generateddev.anqi.com_80Click to open.
  3. Reviseroot,Increase/public,result:
root   "C:/phpstudy_pro/WWW/dev.anqi.com/public";
  1. turn uplocation /, in front of it, add the pseudo-static configuration of Shangan Enterprise CMS:
        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;
        }

existlocation /The following configuration is added to the next line:

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

deletelocation /The default configuration for the last second line:

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

Return to PhpStudy homepage, restart Nginx, and after setting a new site, open the domain name in the browser.

Start installing the CMS

Copy the installation package to the website root directoryC:/phpstudy_pro/WWW/dev.anqi.com, and unzip. Double-click to runanqicms.exe, In the installation interface of the opened browser, enter the database information. Since the domain name is set this time, fill in the URL column.http://dev.anqi.com, and click the Install button.