个人随笔
目录
服务器配置-7、my.cnf和nginx.conf配置文件
2019-04-30 22:25:27

my.cnf

  1. [mysql]
  2. # 设置mysql客户端默认字符集
  3. default-character-set=utf8
  4. socket=/var/lib/mysql/mysql.sock
  5. [mysqld]
  6. skip-name-resolve
  7. #设置3306端口
  8. port = 3306
  9. innodb_buffer_pool_size = 50M
  10. socket=/var/lib/mysql/mysql.sock
  11. # 设置mysql的安装目录
  12. basedir=/usr/local/mysql
  13. # 设置mysql数据库的数据的存放目录
  14. datadir=/usr/local/mysql/data
  15. # 允许最大连接数
  16. max_connections=200
  17. # 服务端使用的字符集默认为8比特编码的latin1字符集
  18. character-set-server=utf8
  19. # 创建新表时将使用的默认存储引擎
  20. default-storage-engine=INNODB
  21. lower_case_table_name=1
  22. max_allowed_packet=16M

nginx.conf

  1. #user nobody;
  2. worker_processes 1;
  3. #error_log logs/error.log;
  4. #error_log logs/error.log notice;
  5. #error_log logs/error.log info;
  6. #pid logs/nginx.pid;
  7. events {
  8. worker_connections 1024;
  9. }
  10. http {
  11. include mime.types;
  12. default_type application/octet-stream;
  13. #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  14. # '$status $body_bytes_sent "$http_referer" '
  15. # '"$http_user_agent" "$http_x_forwarded_for"';
  16. #access_log logs/access.log main;
  17. sendfile on;
  18. #tcp_nopush on;
  19. #keepalive_timeout 0;
  20. keepalive_timeout 65;
  21. #gzip on;
  22. server {
  23. listen 80;
  24. server_name localhost;
  25. #charset koi8-r;
  26. #access_log logs/host.access.log main;
  27. # location / {
  28. # root html;
  29. # index index.html index.htm;
  30. # }
  31. location / {
  32. proxy_pass http://localhost:8080;
  33. proxy_set_header Host $host;
  34. proxy_set_header X-Real-IP $remote_addr;
  35. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  36. proxy_set_header X-Forwarded-Proto https;
  37. proxy_next_upstream off;
  38. proxy_connect_timeout 30;
  39. proxy_read_timeout 300;
  40. proxy_send_timeout 300;
  41. }
  42. #error_page 404 /404.html;
  43. # redirect server error pages to the static page /50x.html
  44. #
  45. error_page 500 502 503 504 /50x.html;
  46. location = /50x.html {
  47. root html;
  48. }
  49. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  50. #
  51. #location ~ \.php$ {
  52. # proxy_pass http://127.0.0.1;
  53. #}
  54. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  55. #
  56. #location ~ \.php$ {
  57. # root html;
  58. # fastcgi_pass 127.0.0.1:9000;
  59. # fastcgi_index index.php;
  60. # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  61. # include fastcgi_params;
  62. #}
  63. # deny access to .htaccess files, if Apache's document root
  64. # concurs with nginx's one
  65. #
  66. #location ~ /\.ht {
  67. # deny all;
  68. #}
  69. }
  70. # another virtual host using mix of IP-, name-, and port-based configuration
  71. #
  72. #server {
  73. # listen 8000;
  74. # listen somename:8080;
  75. # server_name somename alias another.alias;
  76. # location / {
  77. # root html;
  78. # index index.html index.htm;
  79. # }
  80. #}
  81. # HTTPS server
  82. #
  83. #server {
  84. # listen 443 ssl;
  85. # server_name localhost;
  86. # ssl_certificate cert.pem;
  87. # ssl_certificate_key cert.key;
  88. # ssl_session_cache shared:SSL:1m;
  89. # ssl_session_timeout 5m;
  90. # ssl_ciphers HIGH:!aNULL:!MD5;
  91. # ssl_prefer_server_ciphers on;
  92. # location / {
  93. # root html;
  94. # index index.html index.htm;
  95. # }
  96. #}
  97. }

当然,这两个配置只是之前安装的时候的配置,现在肯定不一样啦

 436

啊!这个可能是世界上最丑的留言输入框功能~


当然,也是最丑的留言列表

有疑问发邮件到 : suibibk@qq.com 侵权立删
Copyright : 个人随笔   备案号 : 粤ICP备18099399号-2