快速拿到当前页面的cookie
最近在做服务器压力测试,需要用到页面的cookie模拟用户登录后的情况。
使用chrome的控制台,快速拿到整个cookie。
document.cookie
最近在做服务器压力测试,需要用到页面的cookie模拟用户登录后的情况。
使用chrome的控制台,快速拿到整个cookie。
document.cookie
由于访问增加,将服务器由apache转换到了nginx。
由于框架底层里用到了SCRIPT_URL,需要配置nginx支持这个参数。
特记录配置:
server {
                listen 80;
                server_name test.com;
                root /data/www;
                location / {
                  index index.php;
                }
                if ( $fastcgi_script_name ~ \..*\/.*php ) {
                        return 403;
                }
                # if the request file name contains one of the below extensions,
                # serve it directly
                if ($request_filename ~* \.(js|ico|gif|jpg|png|css|xml|php|txt)$) {
                  break;
                }
                # otherwise, /index.php handles the request
                rewrite ^(.*)$ /index.php$1 last;
                location ~ ^(?P.+\.php)(?P.*)$ {
                  include fastcgi_params;
                  fastcgi_param PATH_INFO $PATH_INFO;
                  fastcgi_param DOCUMENT_ROOT /data/www;
                  fastcgi_param PATH_TRANSLATED $document_root$PATH_INFO;
                  fastcgi_param SCRIPT_FILENAME $document_root$SCRIPT_FILENAME;
                  fastcgi_index index.php;
                  fastcgi_param RUN_MODE production;
                  # Attention!  Both PHP_SELF and SCRIPT_NAME must contain the same value,
                  # but they don't!
                  fastcgi_param PHP_SELF $uri;
                  fastcgi_param SCRIPT_NAME $uri;
                  # set SCRIPT_URL/SCRIPT_URI for compatibility
                  fastcgi_param SCRIPT_URL $PATH_INFO;
                  fastcgi_param SCRIPT_URI $scheme://$http_host$PATH_INFO;
                  fastcgi_param PHP_VALUE "include_path=$document_root:$document_root/include";
                  try_files $SCRIPT_FILENAME =404;
                  fastcgi_pass  unix:/tmp/php-fcgi-faq.sock;
                }
}
                  svn: warning: cannot set LC_CTYPE locale svn: warning: environment variable LANG is en svn: warning: please check that your locale name is correct svn: Can't convert string from 'UTF-8' to native encoding:
解决方法:
vim ~/.profile 添加如下代码: export LANG="zh_CN.UTF-8" export LC_ALL="zh_CN.UTF-8"
/usr/sbin/useradd -d /data/home/don -m -G users don
将其中的don改为你需要的用户名即可。
passwd don
输入两次密码即可。
以上命令都需要在root下执行。
好久没有赶过的晚高峰,希望后面工作生活能够平衡一些。