【问题标题】:Redmine duplicate URL access / & /redmineredmine 重复 URL 访问 / & /redmine
【发布时间】:2015-07-20 12:35:40
【问题描述】:

我设法通过 example.org/redmine URL 访问了我的 Redmine。 但实际上,在 example.org/ 上仍然可以访问它

我无法让它只在 /redmine 别名上工作。 这是我的配置

<VirtualHost *:80>
   LoadModule passenger_module /usr/local/share/gems/gems/passenger-5.0.11/buildout/apache2/mod_passenger.so
   <IfModule mod_passenger.c>
     PassengerRoot /usr/local/share/gems/gems/passenger-5.0.11
     PassengerDefaultRuby /usr/bin/ruby
     PassengerUser apache
   </IfModule>


  DocumentRoot /var/www
  PassengerAppRoot /var/www/redmine

  RailsBaseURI /redmine
  Alias /redmine /var/www/redmine/public
  TransferLog "logs/redmine_acess_log"
  ErrorLog "logs/redmine_error_log"
</VirtualHost>

当我输入 example.org/zriogjqoerqgj 时,我想要默认的 ErrorDocument,而不是 Redmine 连接的东西。

【问题讨论】:

    标签: apache url redmine


    【解决方案1】:

    添加目录指令,例如:

    <Directory /var/www/redmine>
    Order allow,deny
    Allow from all
    Require all granted
    </Directory>
    

    还有一个

    <Directory /var/www>
    Order deny,allow
    Deny from all
    </Directory>
    

    【讨论】:

      【解决方案2】:

      您的虚拟主机应如下所示:

       <VirtualHost *:80> 
              ServerName example.org
              DocumentRoot /var/www
              ErrorLog logs/redmine_error_log
              <Directory "/var/www/">
                      Allow from all
                      Options -MultiViews
              </Directory>
      
              Alias /redmine /var/www/redmine/public/
              <Location /redmine>
                      PassengerBaseURI /redmine
                      PassengerAppRoot /var/www/redmine
              </Location>
              <Directory /var/www/redmine/public/ >
                      Options Indexes ExecCGI FollowSymLinks -MultiViews
                      Order allow,deny
                      Allow from all
                      AllowOverride all
              </Directory>
      </VirtualHost>
      

      我在Passenger documentation之后做了这个解决方案

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2015-10-17
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-12-31
        • 2015-09-23
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多