First, determine whether your environment is configured according to redhat one-click web environment installation guide. If not, configure the environment first.
First, determine whether your environment is configured according to redhat one-click web environment installation guide. If not, configure the environment first...
Import nginx configuration file directory first
Enter the following command
- Cd/alidata/server/nginx/conf/vhosts
Enter
- Ll
See if it is like the following
Use xftp to drag default. conf. bak to the local device and open it in a text editor. We recommend that you use emeditor.
For the use of xftp, see here: http://bbs.aliyun.com/read.php? Tid = 3337
Modify the domain name and directory as shown in the following figure.
If you need to configure pseudo-static rules for the website, set the pseudo-static call file and place the pseudo-static rule file in the rewrite directory ..
We have preset pseudo-static rules for some common programs in the rewrite directory.
For example, if you are using a phpcms program. Modify the configuration file as shown in.
Okay. Adjusted!
Save the file as another one. Note the parameter settings shown in the image.
Use xftp to upload files to the server
Create a website directory
- Mkdir-p/alidata/www/website directory name
Let's test whether the file we configured is correct.
Input
- /Alidata/server/nginx/sbin/nginx-t
Have you seen it?
Reference 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 website configuration is complete!