Project

General

Profile

Macos 12.5 installation: Web interface missing CSS and/or permission denied

Added by Jutta Buschbom over 2 years ago

Using the Redmine installation guides and a variety of information on the web, I installed Homebrew, a s d f (forum produces error 422 if spelled without spaces), Passenger, Ruby, Redmine and created a certification authority/certificate on a Macos 12.5 Monterey, intel processor system, running Apache2 (httpd -v: Server version: Apache/2.4.53 (Unix)) and Firefox 10.3.0.1. All seemed to progress steadily until the last(?) step of accessing Redmine via its web interface. I am running into two alternative errors.

1. The connection to Redmine's entry page works, however it is rendered without the CSS stylesheet

Entering the address for Redmine in Firefox (currently redmine.local/redmine-5.0/public, with 127.0.0.1 redmine.local added as last line to /private/etc/apache2/hosts) the result is a purely text-based webpage. The webpage is functional, subpages are text-based, too. Below is the corresponding virtual host defined in /private/etc/apache2/other/redmine.conf, called by “Include /private/etc/apache2/other/*.conf”, the last line in /private/etc/apache2/httpd.conf (with the call to httpd-vhosts.conf commented out in httpd.conf):

<VirtualHost *:80>
    ServerName  redmine.local
     DocumentRoot "/Library/WebServer/Sites" 
    <Directory /Library/WebServer/Sites/redmine-5.0/public>
        Options Indexes FollowSymLinks
        Options -Multiviews
        MultiviewsMatch Any
        AllowOverride All
        Require all granted
    </Directory>
    RailsBaseURI /redmine-5.0/public
    RailsEnv production
</VirtualHost>

Searching for a solution, I found the suggestion that Ruby/Rails and httpd shouldn't access the same files in the same directory, and that the solution is a symbolic link to the directory via which httpd then accesses the files. I created the symbolic link using

sudo ln -s /Library/WebServer/Sites/redmine-5.0/private /private/var/www/redmine

(I also tried “sudo ln -s /Library/WebServer/Sites /private/var/www/redmine”). To set the correct user, group and permissions the following commands were used (likely ending with too wide a scope) from within the source and target directories, respectively:

sudo chown -R _www:_www /Library/WebServer/Sites
sudo chmod -R 755 /Library/WebServer/Sites
chmod +a "_www allow execute" /Library/WebServer/Sites

After each change in redmine.conf the configuration file was reloaded by restarting apache2 using “sudo apachectl restart”, and before reloading the webpage if in doubt I deleted Firefox's history and cache (right side panel - History).

One question is if it is also necessary to run the following commands in /Library/WebServer/Sites/redmine-5.0 and/or /var/www/redmine after each of the changes in redmine.conf

rake generate_secret_token
sudo RAILS_ENV=production rake db:migrate
RAILS_ENV=production REDMINE_LANG=en bundle exec rake redmine:load_default_data

2) Applying the symbolic links results in 403 errors of permission denied in Firefox

Using the symbolic links, the address of the Redmine entry page in Firefox becomes, if I understand it right, redmine.local/redmine. The corresponding configuration of redmine.conf in which these links are used has the set-up:

<VirtualHost *:80>
    ServerName  redmine.local
     DocumentRoot "/Library/WebServer/Sites" 
    <Directory /var/www/redmine>
        Options Indexes FollowSymLinks
        Options -Multiviews
        MultiviewsMatch Any
         AllowOverride All
        Require all granted
    </Directory>
    RailsBaseURI /redmine
    RailsEnv production
</VirtualHost>

Reloading this configuration and using redmine.local/redmine as address in Firefox results in a 403 error page stating "Forbidden - You don't have permission to access this resource.". The corresponding error entries in apache2's log (tail -f /var/log/apache2/error_log) are

[datetime][authz_core:error] [pid xxx] [client 127.0.0.1:50910] AH01630: client denied by server configuration: /Library/WebServer/Sites/redmine
[datetime][authz_core:error] [pid xxx] [client 127.0.0.1:50910] AH01630: client denied by server configuration: /Library/WebServer/Sites/favicon.ico, referer: http://redmine.local/redmine

Having worked with Redmine for project and time management before, I really would like the installation to work out, so that I can use it again. However, after four days steadily progressing with a for me completely new stack of software, I am currently at a loss of where to search and how to proceed. I would very much appreciate your advise and insights for clarifying and solving the problems.

Previously I had installed Redmine by taking advantage of the bitnami (native?/VM?) installer. However, when it needed to be updated after a year, I couldn't do so while at the same time finding, transferring and keeping my existing data (after the process of the past days, I likely have a better idea of Redmine's backbone). At that point, I also had become interested in expanding Redmine's basic functionality by adding plugins and wasn't sure how well that would work with the installer. In addition, on bitnami's download page for the native installers (https://bitnami.com/stack/redmine/installer), they currently are pointing to a blog post (https://blog.bitnami.com/2021/04/amplifying-our-focus-on-cloud-native.html) stating that they plan to focus on cloud solutions and have already discontinued the native Linux installers. Thus, I am hesitating to go that way.

Thank you very much in advance, any help is greatly appreciated.

Best wishes,

Jutta


Replies (1)

RE: Macos 12.5 installation: Web interface missing CSS and/or permission denied - Added by Jutta Buschbom over 2 years ago

Checking the errors for both variants:

Configuration for redmine.local/redmine-5.0/public missing CSS

tail -f /var/log/apache2/error_log

results in

...
App 11984 output: /Users/<user>/.a s d f/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-1.17.2/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
App 11984 output: /Users/<user>/.a s d f/installs/ruby/3.1.2/lib/ruby/3.1.0/cgi/util.rb:30: warning: already initialized constant CGI::Util::TABLE_FOR_ESCAPE_HTML__
App 11984 output: /Users/<user>/.a s d f/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/cgi-0.3.2/lib/cgi/util.rb:30: warning: previous definition of TABLE_FOR_ESCAPE_HTML__ was here
App 11984 output: /Users/<user>/.a s d f/installs/ruby/3.1.2/lib/ruby/3.1.0/x86_64-darwin21/stringio.bundle: warning: already initialized constant StringIO::VERSION
App 11984 output: sh: svn: command not found

However, homebrew and which tell me that subversion is installed and up-to-date. It's located at /usr/local/bin/svn and /usr/local/bin is listed in $PATH.

Second configuration for redmine.local/redmine with permission denied error

The error is given as

[Tue Aug 09 19:17:43.281954 2022] [authz_core:error] [pid xxx] [client 127.0.0.1:52333] AH01630: client denied by server configuration: /Library/WebServer/Sites/redmine
[Tue Aug 09 19:17:43.411296 2022] [authz_core:error] [pid xxx] [client 127.0.0.1:52333] AH01630: client denied by server configuration: /Library/WebServer/Sites/favicon.ico, referer: http://redmine.local/redmine
    (1-1/1)