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
    • 最新
    • 标签
主页 / user-127140

Cameron Aziz's questions

Martin Hope
Cameron Aziz
Asked: 2012-08-03 20:16:27 +0800 CST

无法启动 apache,说 html 文件夹不是目录

  • 1

当我尝试启动 httpd 时:

[root@cameronaziz www]# service httpd start
Starting httpd: Syntax error on line 292 of /etc/httpd/conf/httpd.conf:
DocumentRoot must be a directory
                                                           [FAILED]

我的配置的第 292 行:

DocumentRoot "/var/www/html"

并列出 www 目录:

[root@cameronaziz www]# ll
total 16
drwxr-xr-x. 2 root root 4096 Feb 13 14:33 cgi-bin
drwxr-xr-x. 3 root root 4096 Jul 11 21:03 error
drwxrwxrwx. 9 root 6226 4096 Aug  2 14:02 html
drwxr-xr-x. 3 root root 4096 Jul 11 21:17 icons

和

[root@cameronaziz ~]# ls -laZ /var/www/html/
drwxrwxrwx. apache 6226 unconfined_u:object_r:admin_home_t:s0 .
drwxr-xr-x. root   root system_u:object_r:httpd_sys_content_t:s0 ..
-rw-r--r--.   6226 6226 unconfined_u:object_r:admin_home_t:s0 authorize.php
-rw-r--r--.   6226 6226 unconfined_u:object_r:admin_home_t:s0 CHANGELOG.txt
-rw-r--r--.   6226 6226 unconfined_u:object_r:admin_home_t:s0 COPYRIGHT.txt
-rw-r--r--.   6226 6226 unconfined_u:object_r:admin_home_t:s0 cron.php
-rw-r--r--.   6226 6226 unconfined_u:object_r:admin_home_t:s0 .gitignore
-rw-r--r--.   6226 6226 unconfined_u:object_r:admin_home_t:s0 .htaccess
drwxr-xr-x.   6226 6226 unconfined_u:object_r:admin_home_t:s0 includes
-rw-r--r--.   6226 6226 unconfined_u:object_r:admin_home_t:s0 index.php
-rw-r--r--.   6226 6226 unconfined_u:object_r:admin_home_t:s0 INSTALL.mysql.txt
-rw-r--r--.   6226 6226 unconfined_u:object_r:admin_home_t:s0 INSTALL.pgsql.txt
-rw-r--r--.   6226 6226 unconfined_u:object_r:admin_home_t:s0 install.php
-rw-r--r--.   6226 6226 unconfined_u:object_r:admin_home_t:s0 INSTALL.sqlite.txt
-rw-r--r--.   6226 6226 unconfined_u:object_r:admin_home_t:s0 INSTALL.txt
-rw-rw-r--.   6226 6226 unconfined_u:object_r:admin_home_t:s0 LICENSE.txt
-rw-r--r--.   6226 6226 unconfined_u:object_r:admin_home_t:s0 MAINTAINERS.txt
drwxr-xr-x.   6226 6226 unconfined_u:object_r:admin_home_t:s0 misc
drwxr-xr-x.   6226 6226 unconfined_u:object_r:admin_home_t:s0 modules
drwxr-xr-x.   6226 6226 unconfined_u:object_r:admin_home_t:s0 profiles
-rw-r--r--.   6226 6226 unconfined_u:object_r:admin_home_t:s0 README.txt
-rw-r--r--.   6226 6226 unconfined_u:object_r:admin_home_t:s0 robots.txt
drwxr-xr-x.   6226 6226 unconfined_u:object_r:admin_home_t:s0 scripts
drwxr-xr-x.   6226 6226 unconfined_u:object_r:admin_home_t:s0 sites
-rw-r--r--. root   root unconfined_u:object_r:admin_home_t:s0 test.php
drwxr-xr-x.   6226 6226 unconfined_u:object_r:admin_home_t:s0 themes
-rw-r--r--.   6226 6226 unconfined_u:object_r:admin_home_t:s0 update.php
-rw-r--r--.   6226 6226 unconfined_u:object_r:admin_home_t:s0 UPGRADE.txt
-rw-r--r--.   6226 6226 unconfined_u:object_r:admin_home_t:s0 web.config
-rw-r--r--.   6226 6226 unconfined_u:object_r:admin_home_t:s0 xmlrpc.php

我的配置有什么问题不会让 apache 启动?我正在运行 CentOS。

apache-2.2
  • 1 个回答
  • 5377 Views
Martin Hope
Cameron Aziz
Asked: 2012-07-08 04:12:54 +0800 CST

CentOS:eth0 未在启动时启动

  • 10

每当我重新启动 CentOS Hyper-V VM 时,eth0都不会自动启动。我需要做的就是执行ifup eth0,一切都已修复,但这在 ssh 中是不可行的!我从运行级别 3 开始。


[root@localhost ~]# cat /etc/*release*
CentOS release 6.2 (Final)

我ifup eth0在控制台执行后:

[root@localhost ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:15:5D:2B:2B:07
      inet addr:10.10.0.3  Bcast:10.10.0.255  Mask:255.255.255.0
      inet6 addr: fe80::215:5dff:fe2b:2b07/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:34 errors:0 dropped:0 overruns:0 frame:0
      TX packets:49 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:4656 (4.5 KiB)  TX bytes:6399 (6.2 KiB)
      Interrupt:9 Base address:0xa000

[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
IPADDR=10.10.0.3
NETMASK=255.255.255.0
GATEWAY=10.10.0.1
USERCTL=no
ONBOOT=yes

[root@localhost ~]# chkconfig --list | grep network
network         0:off   1:off   2:on    3:on    4:on    5:on    6:off

尝试关闭网络管理器后

[root@localhost ~]# chkconfig NetworkManager off
error reading information on service NetworkManager: No such file or directory
[root@localhost ~]# service NetworkManager status
NetworkManager: unrecognized service


最近的干净启动

[root@localhost ~]# grep eth0 /var/log/messages
Jul  7 02:12:44 localhost kernel: eth0: Digital DS21140 Tulip rev 32 at MMIO 0xfebff000, 00:15:5d:2b:2b:07, IRQ 9.
Jul  7 02:13:15 localhost kernel: eth0: Using EEPROM-set media 100baseTx-FDX.

[root@localhost ~]# dmesg | grep eth0
eth0: Digital DS21140 Tulip rev 32 at MMIO 0xfebff000, 00:15:5d:2b:2b:07, IRQ 9.
eth0: Using EEPROM-set media 100baseTx-FDX.
eth0: no IPv6 routers present


我见过的唯一问题是,当我执行命令时ifup eth0出现以下错误,但eth0仍然可以开始:

[root@localhost ~]# ifup eth0
/etc/sysconfig/network-scripts/ifup-ipv6: line 56: /etc/sysconfig/network: No such file or directory
/etc/sysconfig/network-scripts/ifup-aliases: line 125: /etc/sysconfig/network: No such file or directory
centos networking eth0
  • 6 个回答
  • 53868 Views

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