Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
浏览器或Apache2看不到文件:";服务器软件正在运行,但未添加任何内容;_Apache2_Ubuntu 13.10 - Fatal编程技术网

浏览器或Apache2看不到文件:";服务器软件正在运行,但未添加任何内容;

浏览器或Apache2看不到文件:";服务器软件正在运行,但未添加任何内容;,apache2,ubuntu-13.10,Apache2,Ubuntu 13.10,在浏览器中打开http 127.0.0.1后,将显示以下信息: 它起作用了!这是此服务器的默认网页。网络服务器 软件正在运行,但尚未添加任何内容 重点是我已将文件添加到DocumentRoot目录中 我改变的事情: /etc/apache2/envvars 从 到 文件/etc/apache2/sites enabled/000-default.conf看起来: <VirtualHost *:80> ServerAdmin webmaster@localhost

在浏览器中打开http 127.0.0.1后,将显示以下信息:

它起作用了!这是此服务器的默认网页。网络服务器 软件正在运行,但尚未添加任何内容

重点是我已将文件添加到DocumentRoot目录中

我改变的事情:

/etc/apache2/envvars

文件/etc/apache2/sites enabled/000-default.conf看起来:

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /home/chiny/Pulpit/lab


<Directory /home/chiny/Pulpit/lab/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Require all granted
    Allow from all
</Directory>

    # The ServerName directive sets the request scheme, hostname and port that
    # the server uses to identify itself. This is used when creating
    # redirection URLs. In the context of virtual hosts, the ServerName
    # specifies what hostname must appear in the request's Host: header to
    # match this virtual host. For the default virtual host (this file) this
    # value is not decisive as it is used as a last resort host regardless.
    # However, you must set it for any further virtual host explicitly.
    #ServerName www.example.com



    # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
    # error, crit, alert, emerg.
    # It is also possible to configure the loglevel for particular
    # modules, e.g.
    #LogLevel info ssl:warn

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    # For most configuration files from conf-available/, which are
    # enabled or disabled at a global level, it is possible to
    # include a line for only one particular virtual host. For example the
    # following line enables the CGI configuration for this host only
    # after it has been globally disabled with "a2disconf".
    #Include conf-available/serve-cgi-bin.conf


</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
此外,chiny还拥有/home/chiny/Pulpit/lab,并由chiny组建

drwxrwsr-x 2 chiny chiny  4096 sty 18 18:37 lab
apache2.conf中没有任何更改

重新启动apache后,此信息:

root@chiny-HP-Compaq-dc7100-CMT-DX438AV:/home/chiny/Pulpit# /etc/init.d/apache2 restart 
 * Restarting web server apache2                                                             AH00557: apache2: apr_sockaddr_info_get() failed for chiny-HP-Compaq-dc7100-CMT-DX438AV 
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message 

看起来index.html是我从var/www复制到documentroot的原始文件。此文件的内容正是这样的消息:“它起作用了!这是此服务器的默认网页。web服务器软件正在运行,但尚未添加任何内容。”

root@chiny-HP-Compaq-dc7100-CMT-DX438AV:/home/chiny/Pulpit/lab# ls -l /home/chiny/Pulpit/lab 
razem 60 
-rwxrwxr-x 1 chiny chiny 3096 sty 18  2013 10.html 
-rwxrwxr-x 1 chiny chiny 2562 sty 18  2013 11.html 
-rwxrwxr-x 1 chiny chiny 3010 sty 18  2013 12.html 
-rwxrwxr-x 1 chiny chiny 3045 sty 18  2013 1.html 
-rwxrwxr-x 1 chiny chiny 3016 sty 18  2013 2.html 
-rwxrwxr-x 1 chiny chiny 2772 sty 18  2013 3.html 
-rwxrwxr-x 1 chiny chiny 2814 sty 18  2013 4.html 
-rwxrwxr-x 1 chiny chiny 2638 sty 18  2013 5.html 
-rwxrwxr-x 1 chiny chiny 2794 sty 18  2013 6.html 
-rwxrwxr-x 1 chiny chiny 2722 sty 18  2013 7.html 
-rwxrwxr-x 1 chiny chiny 2591 sty 18  2013 8.html 
-rwxrwxr-x 1 chiny chiny 2620 sty 18  2013 9.html 
-rw-r--r-- 1 chiny chiny  177 sty 18 18:37 index.html 
-rwxrwxr-x 1 chiny chiny    0 sty 18 14:43 plik 
-rwxrwxr-x 1 chiny chiny 1711 sty 17  2013 styles.css 
-rwxrwxr-x 1 chiny chiny 3181 sty 17  2013 w3schoolslogo.gif 
drwxrwsr-x 2 chiny chiny  4096 sty 18 18:37 lab
root@chiny-HP-Compaq-dc7100-CMT-DX438AV:/home/chiny/Pulpit# /etc/init.d/apache2 restart 
 * Restarting web server apache2                                                             AH00557: apache2: apr_sockaddr_info_get() failed for chiny-HP-Compaq-dc7100-CMT-DX438AV 
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message