Home > Operation and Maintenance > Linux Operation and Maintenance > Linux configuration nginx pseudo-static

Linux configuration nginx pseudo-static

王林
Release: 2019-10-16 17:59:54
Original
4979 people have browsed it

Linux configuration nginx pseudo-static

1、首页,进入linux的命令窗口

2、然后输入以下命令

#vim /usr/local/nginx/conf/nginx.conf
Copy after login

3、编辑linux的设置文件并找到以下代码:

server{ …… location / { index index.htm index.html index.php;
#以下是伪静态设置 if (!-e $request_filename) { rewrite ^/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)\.html 
/index.php?m=$1&c=$2&a=$3&$4=$5&$6=$7 last; break; }
#以下是伪静态设置 } ……}
Copy after login

4、设置好后按:wq保存编辑

5、最后重启nginx,使用命令:

/etc/init.d/nginx reload
Copy after login

推荐教程:Linux视频教程

The above is the detailed content of Linux configuration nginx pseudo-static. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template