Centos解决nps与nginx80端口冲突
修改nps的配置文件,解除80和443端口的占用
注:配保存在
/etc/nps/conf/nps.conf
修改部分:
http_proxy_port=7780 #原为80
https_proxy_port=7443 #原为443
修改结果:
#############################################
# 基本设置
#############################################
appname=nps
# Boot mode (dev|pro)
runmode=pro
# Secure mode 开启后提高安全性,不再兼容旧版客户端连接
secure_mode=true
# DNS 服务器配置
dns_server=8.8.8.8
# NTP 服务器配置
#ntp_server=pool.ntp.org
#ntp_interval=5
#############################################
# 域名转发设置
#############################################
# HTTP/HTTPS 代理设置:端口为 0 时不启动代理服务
http_proxy_ip=0.0.0.0
http_proxy_port=7780 #原为80
https_proxy_port=7443 #原为443
#http3_proxy_port=443
# HTTPS 默认证书配置
https_default_cert_file=conf/server.pem
https_default_key_file=conf/server.key
# 自动申请证书保存目录
ssl_path=conf/ssl
# 自动申请证书使用的邮箱
ssl_email=you@yours.com
# 自动申请证书使用的CA(LetsEncrypt|ZeroSSL|GoogleTrust)
ssl_ca=LetsEncrypt
# ZeroSSL 需要提供 API Key
#ssl_zerossl_api=xxx
# 证书缓存最大个数(0 不限制)
ssl_cache_max=0
# 证书缓存重载间隔(单位:s)
ssl_cache_reload=3600
# 证书缓存闲置清理(单位:m)
ssl_cache_idle=60
# 获取客户端真实 IP
http_add_origin_header=true
# 当使用 Nginx 等反向代理 http_proxy_port 时,通过向 HEAD 中插入 X-NPS-Http-Only 和密码来避免 301 重定向(留空关闭该功能)
#x_nps_http_only=password
x_nps_http_only=
# HTTP 缓存配置 (已弃用)
http_cache=false
http_cache_length=100
#############################################

浙公网安备 33010602011771号