相关疑难解决方法(0)

从 apache2 的 2.4.7 版本开始,我的本地网站应该放在哪里?

我最近安装了 Ubuntu 14.04,然后我安装lamp-server并将我的网页放在/var/www目录中,但是当我在浏览器中打开 localhost 时什么也没有。我认为这是因为 Zend 更新了 Apache。

不管是什么原因,我想知道在哪里保存我的 php 文件,以便我可以从浏览器访问它们。

lamp apache2

53
推荐指数
2
解决办法
15万
查看次数

Apache 2.4.6 更改 DocumentRoot 目录后 403 禁止

所以我刚刚安装了一个带有 Ubuntu 13.10 的虚拟机。我想在更新我的 ubuntu 12.04 服务器之前使用 apache 2.4.6。我希望我的文档根目录位于我的主文件夹中,因此我在etc/apache2/sites-available/000-default.conf

当我这样做时,我只会收到禁止的消息。我将新文件夹权限设置为 777,但仍然被禁止。我什至在新目录中放了一个 index.html 文件,它只是说 hello world 但什么也没有。这是我的 000-default.conf 文件。

<VirtualHost *:80>
# 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) …
Run Code Online (Sandbox Code Playgroud)

server permissions apache2.4

34
推荐指数
2
解决办法
21万
查看次数

更新到 13.10 后,Apache 虚拟主机不再工作

我今天将我的 kubuntu 更新到 13.10,我之前运行良好的虚拟主机不再运行。

s2ensitea2dissite命令要求“网站XXXXXX并不存在”连文件都在网站-aviable并分别在网站启用我tryed从启用的网站,删除,然后重新启用它们,但仍阿帕奇声称他们就不会存在。

这是我的虚拟主机之一。他们基本上都是这样。

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName expsite.local

    DocumentRoot /var/www/expsite/htdocs
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/expsite/htdocs/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride FileInfo
        Order allow,deny
        allow from all
    </Directory>

#   ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
#   <Directory "/usr/lib/cgi-bin">
#       AllowOverride None
#       Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
#       Order allow,deny
#       Allow from all
#   </Directory>

        CustomLog /var/www/expsite/logs/access.log combined
        ErrorLog /var/www/expsite/logs/error.log
        LogLevel warn

#    Alias /doc/ "/usr/share/doc/"
#    <Directory "/usr/share/doc/">
#        Options Indexes …
Run Code Online (Sandbox Code Playgroud)

server php virtualhost apache2

25
推荐指数
1
解决办法
1万
查看次数

为什么 Ubuntu 14.04 上的 Apache 虚拟主机不起作用?

我在 Ubuntu 14.04 上安装了 Apache 2.4,并且按http://localhost/地址运行正常。但是当我尝试添加一个新的虚拟主机时,例如http://bow.loc并重新启动 apache,新地址http://bow.lochttp://localhost.

我的配置是:

<VirtualHost *:80>
    ServerName www.bow.loc
    ServerAlias bow.loc
    DocumentRoot /var/www/html/bow/web

    <Directory /var/www/html/bow>
        AllowOverride All
        Options FollowSymLinks MultiViews
        Order allow,deny
        Allow from all
        <IfModule mod_rewrite.c>
            RewriteEngine On
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^(.*)$ /app.php [QSA,L]
        </IfModule>
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)

我怎样才能得到我的网站http://bow.loc

server virtualhost apache2 apache2.4 14.04

24
推荐指数
2
解决办法
11万
查看次数

标签 统计

apache2 ×3

server ×3

apache2.4 ×2

virtualhost ×2

14.04 ×1

lamp ×1

permissions ×1

php ×1