Access the site using domain name under Windows
If you need to access the Anqi CMS site using a domain name in Windows, you need to useNginxIf not necessary, there is no need to hassle.
If you are running AnQi CMS locally and pushing static files to the server to be used as a static website, please follow the steps below.
- In PHPStudy, start Nginx, switch to the website tab, create a website. Enter the domain name, such as
dev.anqi.comThe root directory can be left as the default generated one, do not check the optionPHPDo not fill in other places. Click confirm to complete the site creation. - Switch to the Settings tab, switch to the configuration file, find
vhosts.confTab, find the corresponding configuration file in the list, such as the one just generateddev.anqi.com_80Click to open. - modify
rootIncrease/publicResult:
root "C:/phpstudy_pro/WWW/dev.anqi.com/public";
- Find
location /Add the pseudo-static configuration of Anqicms 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;
Go back to the PhpStudy homepage, restart Nginx, a new site is set up, and open the domain in the browser.
Start installing AnQi CMS
Copy the package to the root directory of the websiteC:/phpstudy_pro/WWW/dev.anqi.comAnd unzip it. Double-click to runanqicms.exeIn the installation interface of the opened browser, enter the database information, as this time a domain name has been set, so enter the website address in the URL fieldhttp://dev.anqi.comand click the install button.