LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   gitweb dont show css javascript etc... (https://www.linuxquestions.org/questions/linux-server-73/gitweb-dont-show-css-javascript-etc-4175573562/)

-Snake- 02-29-2016 10:31 AM

gitweb dont show css javascript etc...
 
Hi everybody, im configuring a gitweb in my server, it works fine, but i dont get that the page show the css (style).

I have add the next to my 000-default.conf in apache2 (debian 8):

Code:

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>
        ScriptAlias /git "/var/www/gitweb/"
        <Directory "/var/www/gitweb">
  DirectoryIndex gitweb.cgi
  Allow from all
  AllowOverride all
  Order allow,deny
  Options ExecCGI
  <Files gitweb.cgi>
  SetHandler cgi-script
  </Files>
  SetEnv  GITWEB_CONFIG  /etc/conf.d/gitweb.conf
</Directory>

And my /etc/gitweb.conf is:

Code:

# path to git projects (<project>.git)
$projectroot = "/home/git/";

# directory to use for temp files
$git_temp = "/tmp";

# target of the home link on top of all pages
#$home_link = $my_uri || "/";

# html text to include at home page
$home_text = "indextext.html";

# file with project list; by default, simply scan the projectroot dir.
$projects_list = $projectroot;

# stylesheet to use
@stylesheets = ("static/gitweb.css");

# javascript code for gitweb
$javascript = "static/gitweb.js";

# logo to use
$logo = "static/git-logo.png";

# the 'favicon'
$favicon = "static/git-favicon.png";

# git-diff-tree(1) options to use for generated patches
#@diff_opts = ("-M");
@diff_opts = ();

Thanks in advance.

btmiller 03-01-2016 06:52 AM

Something looks a bit odd about your configuration (which is a bit hard to read due to the inconsistent indentation) of your Apache config. You have:

Code:

ScriptAlias /git "/var/www/gitweb/"
But it seems to me that there should be things other than CGI scripts in /var/www/gitweb. The configuration given on HowTo Forge looks a little bit different.

Also, on Debian 8, the Allow/Deny syntax has changed as Apache 2.4 is in use instead of 2.2. You have the old style syntax in your configuration. I doubt it's your main problem, but it may be causing some side effects.

I've found that the best thing to do is try to load a css file manually in your browser and then check the Apache error_log to see the exact problem. This should give you some clues as to what needs to be fixed.


All times are GMT -5. The time now is 04:37 PM.