Qunhui nginx to enable pseudo-static
1. Login to ssh
Qunhui nginx to enable pseudo-static
First, enable ssh in the admin page
Go to putty (click on it to go to the official website) and enter the IP address of the QunHui LAN (the default port is 22).
Enter your username and password, then sudo -i to use the root user
2. Go to the configuration file
Enter the command
cat /etc/nginx/app.d/server.webstation-vhost.conf
View configuration
As shown, to change the configuration of this virtual host with port number 11000, we can go to
This directory, the directory after include,
cd /usr/local/etc/nginx/conf.d/fb275ea7-bd25-4d12-af28-b203b4ce83fe
vi user.conf
3. Open the editor, then enter the pseudo-static rules
If think php5.1 is
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
}
}
WordPress is
try_files $uri $uri/ /index.php?$args;
Eleven other common Nginx pseudo-static rules
We can press i to open the input mode, then write the configuration file, when finished, press ESC, then type :wq to save and exit
4. Restart the nginx service of Qunhui
Enter the command
nginx -s reload
This will complete the restart and the pseudo-static rules will take effect.