No Design
Added by Nico Herbig about 16 years ago
Hi @all,
I am a newbie in reference to Redmine. I installed Readmine under Apache 2 (openSuSE10.3). I use the mod_fastcgi module to load the application. Everything is fine but no css is loaded. It means I see the text but no design. Please take a look http://projects.the-green-modeling.de.
Here is my configuration part for the public directory:
<VirtualHost 87.106.80.25:80> ServerName projects.the-green-modeling.de:80 SuexecUserGroup green.modeling psacln ScriptAlias /cgi-bin/ /srv/www/vhosts/the-green-modeling.de/subdomains/projects/cgi-bin/ DocumentRoot /srv/www/vhosts/the-green-modeling.de/subdomains/projects/httpdocs/public <Directory /srv/www/vhosts/the-green-modeling.de/subdomains/projects/httpdocs/public> AllowOverride all Order allow,deny Allow from all <IfModule sapi_apache2.c> php_admin_flag engine off </IfModule> <IfModule mod_php5.c> php_admin_flag engine off </IfModule> <IfModule mod_fastcgi.c> AddHandler fastcgi-script fcgi Options +ExecCGI +Includes +FollowSymLinks </IfModule> Options -Includes -ExecCGI </Directory> </VirtualHost>
I would be very happy if anyone can help me ;-)
Thanks a lot,
Nico Herbig
Replies (18)
RE: No Design
-
Added by Martin Herr about 16 years ago
Hi Nico,
I may be wrong but I think this is a misconfiguration of apaches rewrite module. Please post the content of your .htacess file.
-Martin
RE: No Design
-
Added by Michael Pirogov about 16 years ago
Take a look on HowTo_run_Redmine_with_a_Mongrel_cluster
RE: No Design
-
Added by Nico Herbig about 16 years ago
Here is the .htaccess file content:
# General Apache options <IfModule mod_fastcgi.c> AddHandler fastcgi-script .fcgi </IfModule> <IfModule mod_fcgid.c> AddHandler fcgid-script .fcgi </IfModule> <IfModule mod_cgi.c> AddHandler cgi-script .cgi </IfModule> Options +FollowSymLinks +ExecCGI # If you don't want Rails to look in certain directories, # use the following rewrite rules so that Apache won't rewrite certain requests # # Example: # RewriteCond %{REQUEST_URI} ^/notrails.* # RewriteRule .* - [L] # Redirect all requests not available on the filesystem to Rails # By default the cgi dispatcher is used which is very slow # # For better performance replace the dispatcher with the fastcgi one # # Example: # RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] RewriteEngine On # If your Rails application is accessed via an Alias directive, # then you MUST also set the RewriteBase in this htaccess file. # # Example: # Alias /myrailsapp /path/to/myrailsapp/public # RewriteBase /myrailsapp RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f <IfModule mod_fastcgi.c> RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] </IfModule> <IfModule mod_fcgid.c> RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] </IfModule> <IfModule mod_cgi.c> RewriteRule ^(.*)$ dispatch.cgi [QSA,L] </IfModule> # In case Rails experiences terminal errors # Instead of displaying this message you can supply a file here which will be rendered instead # # Example: # ErrorDocument 500 /500.html ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
RE: No Design
-
Added by Jim Mulholland about 16 years ago
If you are using Apache, I would seriously consider using Phusion's Passenger.
No Mongrel's to deal with here.
We recently migrated our Redmine instance from a NGINX / Mongrel Cluster configuration to Passenger and have been very happy so far.
If you do try out passenger, you need to delete your "public/.htaccess" file or you will get no styles like you are seeing here.
RE: No Design
-
Added by Nico Herbig about 16 years ago
So I downloaded and installed passenger with the command gem install passenger. Can you explain me the next steps to run Redmine?
RE: No Design
-
Added by Jim Mulholland about 16 years ago
Did you watch the RailsCast?
http://www.modrails.com/videos/passenger.mov
The instructions here should be enough to get you started. If not, let me know where you are getting stuck.
RE: No Design
-
Added by Martin Herr about 16 years ago
@all: Nico is using PLESK and I can't see why using Rails in FastCGI-mode with plesk should be a bad idea. It's slow and there are better (and more complex) solutions but fastcgi with PLESK works out-of-the-box :)
You should check your file permissions because I can't find an error in your .htaccess-file.
RE: No Design
-
Added by Nico Herbig about 16 years ago
So I changed the file permissions to 777 but it didn't work. Do you have any other idea to solve this problem?
RE: No Design
-
Added by Nico Herbig about 16 years ago
Jim Orton: Hi Jim it didn't work with Passenger, too. I see no design. Now, I would like to explain you my steps.
First I downloaded Passenger with the command "gem install passenger". Second I installed Passenger with "passenger-install-apache2-module". The next step was to set up loadmodule and the other paths. I create a new file named "mod_passenger.conf" and saved this file in the "/etc/apache2/conf.d/" folder. I added the following lines.
# Configuration for mod_passenger to deploy ruby on rails applications LoadModule passenger_module /usr/lib64/ruby/gems/1.8/gems/passenger-2.0.1/ext/apache2/mod_passenger.so PassengerRoot /usr/lib64/ruby/gems/1.8/gems/passenger-2.0.1 PassengerRuby /usr/bin/ruby
Next, I restarted Apache and saw that Passenger was loaded. I think great and downloaded Redmine with the svn-command "svn export http://redmine.rubyforge.org/svn/trunk redmine". I used the trunk version because I have installed Rails 2.1.
I copied all files in the "/srv/redmine/the-green-modeling.de/projects" folder and edit the "/config/database.yml" file with my settings. It means, I followed the instructions on the Redmine website "http://www.redmine.org/wiki/redmine/RedmineInstall".
The next step was to change the file permmissions and delete the .htaccess file in the public folder:
chown -R wwwrun:www * (set new owner for every file and folder) chmod -R 755 files log tmp
The last step was to create a new config file to set up a new virtual host. I create a new file named "redmine.conf" and saved this file in the "/etc/apache2/conf.d/" folder. I added the following lines.
# This is the configuration file for Redmine installations # Redmine installation for projects.the-green-modeling.de <VirtualHost 87.106.80.25:80> ServerName projects.the-green-modeling.de:80 ServerAdmin "webmaster@nico-herbig.de" DocumentRoot /srv/redmine/the-green-modeling.de/projects/public </VirtualHost>
Now, I restarted apache again and saw no changes.
I hope this settings can help you to resolve my problem.
Thanks,
Nico
RE: No Design
-
Added by Jim Mulholland about 16 years ago
It appears to be a permission issue.
The below url should display your CSS file not give a "Access forbidden!" message:
http://projects.the-green-modeling.de/stylesheets/application.css
Try adding the "public" folder to your chmod statement.
chmod -R 755 public
RE: No Design
-
Added by Nico Herbig about 16 years ago
It works ;-)
I changed the file permissions for the "public"-directory to 755 and modify my "redmine.conf"-file for Apache. Here is the new conf-file.
# Redmine installation for projects.the-green-modeling.de <VirtualHost 87.106.80.25:80> ServerName projects.the-green-modeling.de:80 ServerAdmin "webmaster@nico-herbig.de" DocumentRoot /srv/redmine/the-green-modeling.de/projects/public <Directory /srv/redmine/the-green-modeling.de/projects/public> Order deny,allow Allow from all </Directory> </VirtualHost>
Thanks to all people that help me to solve this ugly problem.
RE: No Design
-
Added by Matt Cushing about 16 years ago
I'm having the same issue, I changed the /var/www/redmine/public directory to 777, but it's still not showing the css.
I followed this pretty closely: http://mugunth.blogspot.com/2008/07/steps-to-deploy-redmine-application-in.html
but got to this point:
NameVirtualHost * ServerName ServerAlias DocumentRoot /var/www/redmine/public Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all ErrorLog /var/log/apache2/error.log LogLevel warn CustomLog /var/log/apache2/access.log combined ServerSignature On
and didn't know what to do. In it he says something about installing it to etc/www, but there is no /etc/www directory.
What else can I show to see what's up? I can sign in and everything seems to be working okay in that manner.
RE: No Design
-
Added by Jim Mulholland about 16 years ago
Hi Matt,
Did you delete your "public/.htaccess" file? This would cause you to get no styles to render in your application through Passenger.
- Jim
RE: No Design
-
Added by Matt Cushing about 16 years ago
I had read in this post that it might solve the problem. I can't FIND it :), that's the problem! Isn't it supposed to be right in redmine/public? I didn't see it using find in explorer(or what linux explorer is called) or using ls in terminal.
RE: No Design
-
Added by Jim Mulholland about 16 years ago
.htaccess is a hidden file.
From your terminal, you should be able to see it by doing a
ls -la public/
and delete with
rm public/.htaccess
RE: No Design
-
Added by Matt Cushing about 16 years ago
Jim, you're awesome. Thanks for helping me find that, it's exactly what was wrong.
RE: No Design
-
Added by julien aubert over 15 years ago
I am trying to setup Redmine with Passenger, Ubuntu 8.0.4.
Passenger is installed, Redmine is configured. It works in: https://myserver/redmine
In /var/www/redmine-0.8/public/.htaccess I have added:
RewriteBase /redmine
In /etc/apache2/sites-available/myserversite I have:
Alias /redmine /var/www/redmine-0.8/public/
NameVirtualHost *:443
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName ..
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/demo.se.crt
SSLCertificateKeyFile /etc/apache2/ssl/demo.se.key
DocumentRoot /var/www
SetEnv HTTPS 1
ErrorLog /var/log/apache2/error.trac.log
CustomLog /var/log/apache2/access.trac.log combined
<Directory /var/www/redmine-0.8/public/>
SetEnv RAILS_ENV production
Options +FollowSymLinks
order allow,deny
allow from All
</Directory>
</VirtualHost>
OK all good. But now here you say I should delete .htaccess, I tried deleting it and remove the Alias command, but then trying at https://myserver/redmine-0.8/public
only lists the directory. It doesn't execute any scripts.
So: why do I need to delete .htaccess?
That is, what parts in it is it that is "bad"?
Also, do redmine need both cgi and passenger? well then if we remove .htaccess then I should add cgi execution etc to my site under the directory?
Would be very thankful for an explanation.
Best regards
Julien
RE: No Design
-
Added by Ве Fio about 15 years ago
Why delete .htaccess? Those .htaccess rules are only for using CGI or FCGI as a Rails server, both very outdated and not recommendable. If you have a real Rails server, as Mongrel or Passenger, you don't need CGI or FCGI. Actually you shouldn't run Passenger and FCGI together. Also, Passenger isn't compatible with custom rewrites.