AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 395084
Accepted
jdog
jdog
Asked: 2012-06-03 23:19:50 +0800 CST2012-06-03 23:19:50 +0800 CST 2012-06-03 23:19:50 +0800 CST

Amazon 上的 Ubuntu 12.04 云版 - Apache2 - /etc

  • 772

我在亚马逊上设置了一个带有 3 个虚拟主机的 Web 服务器。出于某种原因,我无法访问任何网站,它们都显示 404 错误。/var/log/apache2/error.log 显示“文件不存在:/etc/apache2/htdocs”

我检查过:

  • a2ensite 我所有的虚拟主机
  • 实际上检查了启用站点的软链接
  • /var/www 中的访问权限为 777,以防用户不是 www-data
  • grep -r htdocs /etc/apache2(不返回任何内容)
  • ports.conf 具有与虚拟主机完全匹配的 NameVirtualHost 指令

这还能是什么?

ports.conf 

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz

NameVirtualHost 107.20.169.163:80
Listen 80

<IfModule mod_ssl.c>
    # If you add NameVirtualHost *:443 here, you will also have to change
    # the VirtualHost statement in /etc/apache2/sites-available/default-ssl
    # to <VirtualHost *:443>
    # Server Name Indication for SSL named virtual hosts is currently not
    # supported by MSIE on Windows XP.
    Listen 443
</IfModule>

<IfModule mod_gnutls.c>
    Listen 443
</IfModule>


sites-available/www.seleconlight.com


<VirtualHost 107.20.169.163:80>

ServerName www.seleconlight.com
DocumentRoot /var/www/www.seleconlight.com

CustomLog /var/log/apache2/www.seleconlight.com-access.log combined
ErrorLog /var/log/apache2/www.seleconlight.com-error.log

</VirtualHost>
apache-2.2 virtualhost
  • 2 2 个回答
  • 474 Views

2 个回答

  • Voted
  1. user9517
    2012-06-03T23:38:38+08:002012-06-03T23:38:38+08:00

    检查您的配置文件,您似乎配置了错误的DocumentRoot指令。

    你真的不希望在你的文件系统的 web 可访问部分的任何地方有 777 个权限。

    • 2
  2. Best Answer
    christian
    2012-06-05T01:45:31+08:002012-06-05T01:45:31+08:00

    也许尝试使用 apt-get remove/ apt-get install 重新安装 Apache

    • 1

相关问题

  • Apache Django Mod_Wsgi - 自动重新加载应用程序

  • Apache:对多个虚拟主机使用相同的目录指令

  • Apache 上的子域不工作 - 找不到服务器

  • PHP 作为 CGI 还是 Apache 模块?

  • 避免将某些丢失的文件记录到 Apache2 错误日志中

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve