VPS侦探论坛

 找回密码
 注册
查看: 3691|回复: 5

创建虚拟主机后,默认主机无法访问

[复制链接]
发表于 2017-8-10 22:31:05 | 显示全部楼层 |阅读模式

军哥你好,就像标题说的,创建虚拟主机后,默认主机无法访问,请问是否需要修改配置文件,又该怎么修改。
下面是默认主机配置文件
<VirtualHost *:88>
ServerAdmin webmaster@example.com
#php_admin_value open_basedir "/home/wwwroot/default:/tmp/:/var/tmp/:/proc/"
DocumentRoot "/mnt/home/www/www.jbyan.com"
ServerName www.jbyan.com
ErrorLog "/home/wwwlogs/IP-error_log"
CustomLog "/home/wwwlogs/IP-access_log" combined
<Directory "/mnt/home/www/www.jbyan.com">
    SetOutputFilter DEFLATE
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    DirectoryIndex index.html index.php
</Directory>
</VirtualHost>


下面是虚拟主机配置文件

<VirtualHost *:88>
ServerAdmin 3489342261@qq.com
php_admin_value open_basedir "/mnt/home/www/www.whlzj.com:/tmp/:/var/tmp/:/proc/"
DocumentRoot "/mnt/home/www/www.whlzj.com"
ServerName www.whlzj.com
ServerAlias whlzj.com
ErrorLog "/home/wwwlogs/www.whlzj.com-error_log"
CustomLog "/home/wwwlogs/www.whlzj.com-access_log" combined
<Directory "/mnt/home/www/www.whlzj.com">
    SetOutputFilter DEFLATE
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    DirectoryIndex index.html index.php
</Directory>
</VirtualHost>


请问是哪里出现问题
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-8-11 08:57:48 | 显示全部楼层


不清楚无法访问是什么错误信息,有具体错误信息才能进行分析
按前面的配置文件里的域名,第一个500,按常见问题开启php错误日志,php错误日志会有相关的错误原因

第二个正常
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2017-8-11 09:25:25 | 显示全部楼层

第一个提示无法找到网页
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2017-8-11 09:37:52 | 显示全部楼层



现在开启了错误日志,重启服务器了,访问还是提示无法找到网页,ping域名表示已经解析成功,但是就是无法访问
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2017-8-11 09:47:54 | 显示全部楼层

错误日志也是空白的~!~~~该怎么解决呢

军哥运维代购:http://shop63846532.taobao.com/

发表于 2017-8-11 17:40:03 | 显示全部楼层

可以尝试记录php错误日志到系统日志试试,没有具体错误信息没法说
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-25 15:25 , Processed in 0.026617 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表