ubuntu查看端口命令 发现netstat -ap | grep 9000 什么都没有打印,说明9000端口没有
切换到 /etc/php/7.2/fpm/pool.d 目录下 打开 www.conf
看到这行 listen = /run/php/php7.2-fpm.sock 将其改成 listen = 127.0.0.1:9000
让他监听本机9000端口
重启php-fpm服务
方法: 进入到 /etc/init.d 目录下,执行./php7.2-fpm restart (可能安装的版本不一样,你这这里的php7.2-fpm名字可能不一样)
重启成功后netstat -ap | grep 9000发现有输出了。
如果用的nginx服务器,修改nginx配置。我的配置在 /etc/nginx,打开nginx.conf
我的配置如下,你可能需要修改listen端口,server_name 参数,root存放路径
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
server {
listen 8081; #安全组内端口,并且不和其他程序冲突
server_name 192.168.193.128; #服务器公网ip
#charset koi8-r;
#access_log logs/host.access.log main;
#静态页面目录 默认为Nginx下的html文件夹 可配置成其他目录 绝对路径即可
root /home/gopath/src/GOSINT/website;
#
#默认首页 上面root路径下的文件
index index.php index.html index.htm;
location ~ \\.php$ {
try_files $uri /index.php =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\\.php)(/.+)$;
fastcgi_param _FILENAME $document_root$fastcgi_ _name;
fastcgi_param PATH_INFO $fastcgi_ _name;
include fastcgi_params;
}
}
继续阅读与本文标签相同的文章
-
人工智能社会实验研究全面展开
2026-05-18栏目: 教程
-
OpenAI机械手“学习”解开三阶魔方技术
2026-05-18栏目: 教程
-
5G时代,能给我们带来什么样的生活改观
2026-05-18栏目: 教程
-
第六届世界互联网大会将首次启用新展馆
2026-05-18栏目: 教程
-
世界首款在BCH区块链上运行的沙盒游戏——RealmX
2026-05-18栏目: 教程
