T
T
Tiamon2017-07-06 10:49:30
Apache HTTP Server
Tiamon, 2017-07-06 10:49:30

Apache2, how to access Redmine from https//site/redmine?

Please help me solve the problem, there is Redmine available via https//site, you need to translate it into https//site/redmine
Config:
/etc/apache2/sites-available/redmine.conf

ServerName localhost

<VirtualHost *:80>
    UseCanonicalName Off
    Include /etc/apache2/conf/redmine.conf
</VirtualHost>

<VirtualHost *:443>
    SSLEngine on
    Include /etc/apache2/conf/redmine.conf
    RequestHeader set X_FORWARDED_PROTO 'https'
</VirtualHost>

/etc/apache2/conf/redmine.conf
ServerAdmin  [email protected]
SetEnv RAILS_ENV production

RewriteEngine On

# Rewrite index to check for static
RewriteRule ^/$ /index.html [QSA]

# Rewrite to check for Rails cached page
RewriteRule ^([^.]+)$ $1.html [QSA]

DocumentRoot /var/www/redmine/redmine/

<Directory /var/www/redmine/redmine>
    Options +FollowSymLinks
    AllowOverride all
    Order allow,deny
    Allow from all
</Directory>

I can’t cope with RewriteEngine, unfortunately I’m not strong in this area, but it took me to work (

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Boris Yakushev, 2017-07-06
@Tiamon

Set up virtual host directly to the directory with your redmine.
Something like:

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "/home/boris/usr/www/redmine.dev/web/"
    ServerName redmine.dev
    ServerAlias www.redmine.dev
    ErrorLog "/home/boris/usr/log/redmine.dev/error.log"
    CustomLog "/home/boris/usr/log/redmine.dev/access.log" common
</VirtualHost>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question