【问题标题】:Symbolic link not allowed or link target not accessible /var/www/html/redmine on Ubuntu 14.04Ubuntu 14.04 上不允许符号链接或链接目标不可访问 /var/www/html/redmine
【发布时间】:2016-04-16 10:42:43
【问题描述】:

您好,当我尝试从远程计算机访问以下路径时出现此错误:http://my_ip/redmine

我做了一个从 /opt/redmine/redmine-3.2.1 到 /var/www/html/redmine 的符号链接。

然后我像这样配置 apache2 配置:

但我也无法访问。

然后我尝试将 FollowSymLinks 激活到 apache2.conf 文件中,但仍然出现错误 403。

最后我发现我必须授予 /opt/redmine/redmine-3.2.1 的访问权限,我用 chmod o+x 做了,但也没有用。

最后我尝试给出根路径(/)但也没有用。

有什么建议吗?

感谢您的帮助。

PD:对不起,如果我的英语这么差。

【问题讨论】:

    标签: apache ubuntu-14.04 redmine symlink ubuntu-server


    【解决方案1】:

    如果您想访问http://your_ip/redmine,请确保 apache 根目录指向 /var/www/html,因为您的文件位于 /var/www/html/redmine。

    您需要像这样在 /etc/apache2/sites-available 上配置 000-default.conf 文件:

    <VirtualHost *:80>
       ServerAdmin webmaster@localhost
       Options FollowSymLinks Indexes
       DocumentRoot /var/www/html
       ErrorLog ${APACHE_LOG_DIR}/error.log
       CustomLog ${APACHE_LOG_DIR}/access.log combined
    </VirtualHost>
    
    #vim: syntax=apache ts=4 sw=4 sts=4 sr noet
    

    然后尝试打开http://your_ip/redmine。如果还是 403 错误,在 /etc/apache2/sites-available 中创建一个名为 redmine.conf 的文件,并像这样配置该文件:

    <VirtualHost *:80>
       ServerAdmin webmaster@localhost
       ServerName redmine
       Options FollowSymLinks
       DocumentRoot /var/www/html/redmine
       ErrorLog ${APACHE_LOG_DIR}/error.log
       CustomLog ${APACHE_LOG_DIR}/access.log combined
    </VirtualHost>
    
    # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
    

    然后chown -R www-data:www-data /var/www/html/redmine

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-08-28
      • 2022-12-19
      • 2011-10-29
      • 2012-07-28
      • 2011-09-20
      • 1970-01-01
      • 2022-08-24
      相关资源
      最近更新 更多