1、下载 PhpPoem
CDN地址:https://cdn.jsdelivr.net/gh/phppoem/[email protected]/phppoem-2.2.2.tar.gz
或GitHub:https://github.com/cleey/phppoem
2、安装 PhpPoem
解压PhpPoem包,放到网站运行目录下即可
Nginx服务器配置文件
server { listen 80; server_name phppoem.com; index index.php index.html index.shtml; root /path/www/web_project/public; # 注意指向web_project项目的public目录下 location /{ if (!-e $request_filename) { rewrite ^/(.*)$ /index.php/$1 last; break; } } location ~ \.php($|/) { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_split_path_info ^(.+\.php)(/.*)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi.conf; } }
注:Apache打开rewrite模块,直接使用