记录一下nginx配置和重写开启

server {
    listen 7000;
    server_name hz.person.pv.cc;
    root /var/www/html/hz_person;
    location / {
        index index.php index.html index.htm;
        if (!-e $request_filename ){
            rewrite ^(.+)$ /index.php?s=$1;
        }
    }
    access_log  /data/log/nginx/personnel_access.log  main;
    error_log   /data/log/nginx/personnel_error.log;
    location ~ \.php$ {
        client_max_body_size 50M;
        client_body_temp_path /tmp;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_read_timeout 600;
        fastcgi_split_path_info ^(.+\.php)(.*)$;
        fastcgi_param PATH_INFO $fastcgi_path_info;
       # proxy_pass   http://127.0.0.1;
    }
}

你可能感兴趣的:(记录一下nginx配置和重写开启)