skip to Main Content

I am trying to get redmine running on an Ubuntu 18.04 with apache.
I followed these instructions: https://www.howtoforge.com/how-to-install-and-configure-redmine-on-ubuntu-1804/
without any problems.

Apache is running and I can access the default apache page “it works” at: http://192.168.178.100/.
But if I try to open the redmine at: http://192.168.178.100/redmine_test I just see the content of the folder (public folder and Gemfile.lock). No website at all.

my redmine_test.conf looks like this:

<VirtualHost *:80>
 ServerAdmin [email protected]
 DocumentRoot /var/www/html/redmine_test
 ServerName 192.168.178.100/redmine_test
 ServerAlias www.192.168.178.100/redmine_test

 <Directory /var/www/html/redmine_test>
     RailsBaseURI /redmine_test
     PassengerResolveSymlinksInDocumentRoot on
 </Directory>

 ErrorLog ${APACHE_LOG_DIR}/error.log
 CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

sudo systemctl status apache2:

apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: active (running) since Mon 2020-03-02 11:15:13 CET; 18s ago
  Process: 12954 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS)
  Process: 7476 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/SUCCESS)
  Process: 12964 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
    Tasks: 37 (limit: 4915)
   CGroup: /system.slice/apache2.service
           ├─13028 /usr/sbin/apache2 -k start
           ├─13029 vlogger (access log)
           ├─13032 /usr/sbin/apache2 -k start
           ├─13033 Passenger watchdog
           ├─13037 Passenger core
           ├─13042 Passenger ust-router
           ├─13069 /usr/sbin/apache2 -k start
           ├─13070 /usr/sbin/apache2 -k start
           ├─13071 /usr/sbin/apache2 -k start
           ├─13072 /usr/sbin/apache2 -k start
           ├─13073 /usr/sbin/apache2 -k start
           ├─13074 /usr/sbin/apache2 -k start
           ├─13075 /usr/sbin/apache2 -k start
           └─13076 /usr/sbin/apache2 -k start

Mar 02 11:15:13 server1 systemd[1]: Starting The Apache HTTP Server...
Mar 02 11:15:13 server1 apachectl[12964]: AH00548: NameVirtualHost has no effect and will be removed in the next release
Mar 02 11:15:13 server1 systemd[1]: Started The Apache HTTP Server.

Edit:
If I test the installation by running WEBrick web server

bundle exec rails server webrick -e production

Everything works as aspected on: http://192.168.178.100:3000

3

Answers


  1. Chosen as BEST ANSWER

    problem solved: The DocumentRoot need to point to public:

    /var/www/html/redmine_test/public
    

  2. It seems to me that you are missing Passenger part of that tutorial.

    Redmine is Ruby on Rails based application, and in order to make it run under Apache, you need at least one of following models to deploy RoR application:

    1. Running via app server like puma, webrick, thin… and served through apache as reverse proxy
    2. Running via passenger as a module
    3. Running as a CGI

    In the tutorial that you have seen, it’s no=2, but in the Apache config that you submitted there seems to be passenger missing.

    Try enabling passenger with following command:

    sudo a2enmod passenger
    
    Login or Signup to reply.
  3. Apache ServerName and ServerAlias directives should contain symbolic (non-IP) values. So if you have registered some domain name you should use it.

    If you haven’t one, you can use any domain name you want (for development/testing purposes of course). Assume you choose redmine.dev, then

    1. Edit redmine_test.conf
    ServerName redmine.dev
    ServerAlias www.redmine.dev
    
    1. Add to /etc/hosts on the box where you open the browser and point it to redmine.dev
    192.168.178.100 redmine.dev www.redmine.dev
    
    1. Point the browser to redmine.dev or www.redmine.dev and you’ll see Redmine interface.
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search