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

Linux configuration nginx pseudo-static

王林
王林Original
2019-10-16 16:11:034923browse

Linux configuration nginx pseudo-static

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

2、然后输入以下命令

#vim /usr/local/nginx/conf/nginx.conf

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; }
#以下是伪静态设置 } ……}

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

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

/etc/init.d/nginx reload

推荐教程: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!

Statement:
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