Nginx 配置(ubuntu)

nginx 配置只能ip 访问

新加的server(注意是新增,并不是在原有的server基础上修改)
server {
  listen 80 default;
  server_name _;
  return 403;
}

nginx php 的配置

location ~ \.php$ {
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include        fastcgi_params;
}

linux cmd 命令:

查看端口 lsof -i:9000   netstat -tnlp | grep 9000 

查看所有端口情况  netstat -tunlp

 
发布了29 篇原创文章 · 获赞 5 · 访问量 7976

猜你喜欢

转载自blog.csdn.net/qq_25194685/article/details/105195163
今日推荐