深圳全飞鸿

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 285|回复: 1
打印 上一主题 下一主题

nginx的安装及fastadmin部署过程

[复制链接]

228

主题

466

帖子

2184

积分

版主

Rank: 7Rank: 7Rank: 7

积分
2184
跳转到指定楼层
楼主
发表于 2024-10-7 20:44:22 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
测试版本:nginx-1.22.1.zipC:\nginx>nginx -v
nginx version: nginx/1.22.1

PHP7的启动:
C:\nginx\php7>php-cgi.exe -b 127.0.0.1:9000 -c php.ini
nginx的重新加载:
C:\nginx>nginx -s reload
nginx的关闭:
C:\nginx>nginx -s stop
nginx的启动:
C:\nginx>start nginx


回复

使用道具 举报

228

主题

466

帖子

2184

积分

版主

Rank: 7Rank: 7Rank: 7

积分
2184
沙发
 楼主| 发表于 2024-10-7 20:51:14 | 只看该作者
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       8087;
  24.         server_name  localhost;
  25.                 root           html/public;
  26.         location ~ \.php(/|$) {
  27.             fastcgi_pass   127.0.0.1:9000;
  28.             fastcgi_index  index.php;
  29.             fastcgi_split_path_info  ^((?U).+\.php)(/?.+)$;
  30.             fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
  31.             fastcgi_param  PATH_INFO  $fastcgi_path_info;
  32.             fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;
  33.             include        fastcgi_params;
  34.         }
  35.     }


  36.     # another virtual host using mix of IP-, name-, and port-based configuration
  37.     #
  38.     #server {
  39.     #    listen       8000;
  40.     #    listen       somename:8080;
  41.     #    server_name  somename  alias  another.alias;

  42.     #    location / {
  43.     #        root   html;
  44.     #        index  index.html index.htm;
  45.     #    }
  46.     #}


  47.     # HTTPS server
  48.     #
  49.     #server {
  50.     #    listen       443 ssl;
  51.     #    server_name  localhost;

  52.     #    ssl_certificate      cert.pem;
  53.     #    ssl_certificate_key  cert.key;

  54.     #    ssl_session_cache    shared:SSL:1m;
  55.     #    ssl_session_timeout  5m;

  56.     #    ssl_ciphers  HIGH:!aNULL:!MD5;
  57.     #    ssl_prefer_server_ciphers  on;

  58.     #    location / {
  59.     #        root   html;
  60.     #        index  index.html index.htm;
  61.     #    }
  62.     #}

  63. }
复制代码


回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|nagomes  

GMT+8, 2025-5-5 11:35 , Processed in 0.028411 second(s), 21 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表