Nginx配置多端口监听:
server {
listen 8099; # 监听 IPv4 的 8099 端口
listen [::]:8099 ipv6only=on; # 监听 IPv6 的 8080 端口,且仅处理 IPv6,防止IPv6 套接字可能同时处理 IPv4
server_name localhost; # 域名或IP
root /var/www/html; # 网站根目录
index index.html; # 默认首页文件
location / {
try_files $uri $uri/ =404;
}
}
新建PHP站点
server
{
listen 8899;
#server_name meeting.com;
index index.php index.html index.htm default.php default.htm default.html;
root /home/data/data1/meeting/public;
#跨域
add_header Strict-Transport-Security "max-age=0";
#PHP-INFO-START PHP引用配置,可以注释或修改
include enable-php-74.conf;
#PHP-INFO-END
location / {