Apache和Nginx虚拟主机的创建
发表于:2025-12-02 作者:千家信息网编辑
千家信息网最后更新 2025年12月02日,一、Apache(1)基于访问主机头(FQDN)cat /etc/httpd/conf.d/vhostfqdn.conf documentroot /data/web01
千家信息网最后更新 2025年12月02日Apache和Nginx虚拟主机的创建
一、Apache
(1)基于访问主机头(FQDN)
cat /etc/httpd/conf.d/vhostfqdn.confdocumentroot /data/web01 servername www.web01.com require all granted CustomLog "logs/a_access_log" combineddocumentroot /data/web02 servername www.web02.com require all granted CustomLog "logs/a_access_log" combineddocumentroot /data/web03 servername www.web03.com require all granted CustomLog "logs/a_access_log" combined
(2)基于ip地址
cat /etc/httpd/conf.d/vhostip.confdocumentroot /data/web01 require all granted documentroot /data/web02 require all granted documentroot /data/web03 require all granted
(3)基于端口号
cat /etc/httpd/conf.d/vhostport.conf listen 8001listen 8002listen 8003documentroot /data/web01 require all granted documentroot /data/web02 require all granted documentroot /data/web03 require all granted
二、Nginx
(1)基于域名且不同站点
server { listen 80; server_name mobile.magedu.com; location / { root html; index index.html index.htm; } location /python { root /mobile; !!!必须在/mobile目录下创建/python目录,且把文件写入python目录中,否则会报错!!! index index.html index.htm; } location /java { root /mobile; index index.html index.htm; } } server { listen 80; server_name www.magedu.com; location / { root html; index index.html index.htm; } location /python { root /www; index index.html index.htm; } location /java { root /www; index index.html index.htm; } }
目录
主机
不同
口号
地址
域名
文件
站点
会报
虚拟主机
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
多人协同服务器搭建
服务器回收价格是多少
新时代网络安全运营方案
合川区提供软件开发服务标志
资阳网络技术推荐厂家
魂力大陆服务器
如何测试服务器性能
软件开发怎么确认单位成本
网安大队加强网络安全会议
软件开发的6个流程
百色手机软件开发
网络安全暴力课后感
pdf如何存放在数据库中
软件开发合同范本格式
北京手机软件开发专业团队
e系列服务器cpu主板
总行科技研发中心软件开发
福山区管理系统软件开发哪家靠谱
计算机考研数据库技术
服务器管理哪家好怎么样
内存数据库 特点
华为网络安全主管履历
广东广电网络服务器云空间
海岛英雄技能升级数据库
公安网络安全攻防职位
h1z1服务器在哪选
数据库真的越老越吃香吗
网络技术要学多久
运城蹲墩网络技术
搭建外网服务器教程