使用 Apache 安装 Reviewboard,显示文件而不是站点

使用 Apache 安装 Reviewboard,显示文件而不是站点

在 centos 7 上安装 reviewboard。

Web 服务器:Apache 在端口 8080 上运行

安装完成后,当我从浏览器访问它时,它会显示目录列表。

下面是我的 apache-wsgi.conf 文件

<VirtualHost *:8080>
ServerName reviews.com
DocumentRoot "/var/www/html/reviews.com/htdocs"

# Error handlers
ErrorDocument 500 /errordocs/500.html

WSGIPassAuthorization On
WSGIScriptAlias "/reviews" "/var/www/html/reviews.com/htdocs/reviewboard.wsgi/reviews"

<Directory "/var/www/html/reviews.com/htdocs">
    AllowOverride All
    Options -Indexes +FollowSymLinks
    Require all granted
</Directory>

# Prevent the server from processing or allowing the rendering of
# certain file types.
<Location "/reviews/media/uploaded">
    SetHandler None
    Options None

    AddType text/plain .html .htm .shtml .php .php3 .php4 .php5 .phps .asp
    AddType text/plain .pl .py .fcgi .cgi .phtml .phtm .pht .jsp .sh .rb

    <IfModule mod_php5.c>
        php_flag engine off
    </IfModule>

    # Force all uploaded media files to download.
    <IfModule mod_headers.c>
        Header set Content-Disposition "attachment"
    </IfModule>
</Location>

# Alias static media requests to filesystem
Alias /reviews/media "/var/www/html/reviews.com/htdocs/media"
Alias /reviews/static "/var/www/html/reviews.com/htdocs/static"
Alias /reviews/errordocs "/var/www/html/reviews.com/htdocs/errordocs"
Alias /reviews/favicon.ico "/var/www/html/reviews.com/htdocs/static/rb/images/favicon.png"

问题是什么以及如何解决。

相关内容