Add pseudo-static methods to Alibaba cloud server nginx

Source: Internet
Author: User

Import nginx configuration file directory first

Enter the following command
Cd/alidata/server/nginx/conf/rewrite
Enter ll
See if it is the same as the screenshot below.
By the way. These are pseudo-static rule files. Open phpwind. conf.
We have configured pseudo-static rules for common programs in the rewrtie directory. You can call it directly.
If not, follow
Create a configuration file by naming program name. conf
The configuration file is clear, and you may say that the website's pseudo-static state is still ineffective. 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
Modify the pseudo-static call File
Let's test whether the file we configured is correct.
Input:
/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 preceding two statements are displayed, the configuration is successful. Restart nginx
/Alidata/server/nginx/sbin/nginx-s reload
Congratulations! the pseudo-static configuration is complete!

In summary, the difference from other self-installed servers lies in the location of related file directories.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.