nginx.conf 590 B

123456789101112131415161718192021
  1. server {
  2. listen 80;
  3. server_name localhost;
  4. root /var/www/html/public;
  5. index index.php index.html index.htm;
  6. location / {
  7. if (!-e $request_filename){
  8. rewrite ^(.+?\.php)(/.+)$ /$1?s=$2 last;#
  9. rewrite ^(.*)$ /index.php?s=$1 last; break;
  10. }
  11. }
  12. location ~ \.php$ {
  13. fastcgi_pass 127.0.0.1:9000;
  14. fastcgi_index index.php;
  15. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  16. include fastcgi_params;
  17. }
  18. }