Home > Article > Operation and Maintenance > 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!