#user nobody; worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; # 主站虚拟主机 server { listen 80; # 域名 或 主机名 server_name localhost; location / { root /home/gs/guos/www/www; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } # 视频虚拟主机【vhost】 server { listen 7007; server_name localhost; location / { root /home/gs/guos/www/vod; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } }
命令如下:
#user nobody; worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; # 主站虚拟主机 server { listen 80; # 域名 或 主机名 server_name www.jngoodnews.com; location / { root /home/gs/guos/www/www; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } # 视频虚拟主机【vhost】 server { listen 80; server_name vod.jngoodnews.com; location / { root /home/gs/guos/www/vod; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } }
重新加载并检查命令如下:
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。