Teach you how to add pseudo-static under nginx

  
                  

First enter the nginx configuration file directory

Please enter the following command

cd /alidata/server/nginx/conf/rewrite

Enter

ll

look like the following screenshot is not the same as



Yes. These are pseudo-static rule files. Let's take a look at phpwind.conf.

We've configured the pseudo-static rules of common procedures in rewrtie directory. You can call it directly.

If you don't have a new configuration file according to the name of the program name.conf

The configuration file is clear, you may say that the website pseudo-static is still not effective. Don't worry, because pseudo-static rules need to be called by the website configuration file.

Enter the following command

cd /alidata/server/nginx/conf/vhosts Go to the website configuration directory

Open the configuration file


< Br>

Modify the pseudo-static call file

Let's test if the file we configured is correct.

Enter

/alidata/server/nginx/sbin/nginx -t

Have you seen it?

nginx: the configuration file /alidata/server/nginx/conf/nginx.conf syntax is ok nginx: configuration file /alidata/server/nginx/conf/nginx.conf test is successful

If the above two sentences appear, the configuration is successful. Restart nginx

/alidata/server/nginx/sbin/nginx -s reload

Congratulations, pseudo-static configuration is complete!

Copyright © Windows knowledge All Rights Reserved