亚马逊上的Ubuntu 12.04云版 – Apache2 – / etc

我已经在3台虚拟主机上搭build了amazon web services器。 出于某种原因,我无法获得任何网站,他们都显示404错误。 /var/log/apache2/error.log显示“文件不存在:/ etc / apache2 / htdocs”

我检查过:

  • a2ensite所有我的虚拟主机
  • 实际上检查了启用网站的软链接
  • 如果用户不是www-data,则将/ var / www中的访问权限设置为777
  • 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 (ie 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> 

也许试着用apt-get remove / apt-get install来重新安装Apache

检查你的configuration文件,看起来你有一个configuration错误的DocumentRoot指令。

你真的不想在你的文件系统的networking访问部分的任何地方有777 perms。