78144666 发表于 2018-6-19 07:50:18

windows下Nginx虚拟机配置

  server {
  listen 80;
  server_name icobak.cn;
  #access_loglogs/_access.log;
  #error_log   log/_error.log;
  set $public_root E:\phper\code;
  root $public_root;
  indexindex.html index.php;
  if (!-e $request_filename) {
  rewrite ^/(.*) /index.php?$1 last;
  }
  location ~ /.svn/ {
  root $public_root;
  deny all;
  }
  location / {
  root $public_root;
  indexindex.html index.php;
  client_max_body_size 10m;
  }
  location ~ \.php$ {
  root $public_root;
  index index.php;
  fastcgi_pass   127.0.0.1:9000;
  fastcgi_indexindex.php;
  fastcgi_paramSCRIPT_FILENAME
  $document_root$fastcgi_script_name;
  include fastcgi_params;
  }
  }
页: [1]
查看完整版本: windows下Nginx虚拟机配置