【160221】服务器管理记录

  • MySQL:show columns of a certain datatable:

    show full columns from [tablename];

  • Nginx:remove root directory

    root /usr/share/nginx/html;

    location / {

    fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script_name;

    }

    /etc/init.d/nginx restart

  • Nginx:add rewrite rules for redirecting,map port 8080 into 80.

    server {
    listen 8080;
    server_name localhost_redirect;
    rewrite ^/(.+)/.* /$1 last;
    location / {
    proxy_pass http://127.0.0.1:80;
    proxy_set_header Host $host:80;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
    }

【160221】服务器管理记录

https://devblog.citruxonve.net/posts/748c6475/

Author

Semprathlon / Simfae Dean

Posted on

02/21/2016

Updated on

07/19/2023

Licensed under

Comments