Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2866
  • Last Modified:

setup viewCVS with apache on redhat enterprise linux 4

hi, i already setup viewCVS  and it run well with standalone server, but i want it run under apache server, please help me how to config apache server to run viewCVS, viewvc were setup at usr/local/viewvc , thanks experts
0
khacduyst
Asked:
khacduyst
  • 7
  • 4
1 Solution
 
m1tk4Commented:

First, create a symling in /var/www to your viewcvs cgi bin:

ln -s /usr/local/viewcvs-0.9.2/cgi /var/www/viewcvs

(note the viewcvs version, you'll figure it out). Then, create a separate config file for it, for example, /etc/httpd/conf.d/viewcvs.conf

In this new config file:

ScriptAlias /cvs /var/www/viewcvs/viewcvs.cgi
<Location /cvs>
    Options +ExecCGI
    DirectoryIndex viewcvs.cgi
</Location>

restart apache:

service httpd restart

go to http://mydearserver.com/cvs

NOTE: you should configure access restrictions somehow in <Location>, either through passwords or limiting by IP's, this config is WIDE OPEN.
0
 
khacduystAuthor Commented:
hi, here what i did like you told me :

1 :  ln -s /usr/local/viewvc-1.0.0/bin/cgi /var/www/viewcvstest

2 : create file viewcvs.conf in /ect/httpd/conf.d

and type this text in that file :

ScriptAlias /cvs /var/www/viewcvstest/viewcvs.cgi
<Location /cvs>
    Options +ExecCGI
    DirectoryIndex viewcvs.cgi
</Location>

3 : restart apache

then i run localhost, apache start correct but when i browse localhost/cvs --> error 404, did i mistake some steps, please help me
0
 
m1tk4Commented:
check that your symlink is correct (in particular viewvc-1.0.0 part) by going to /var/www and trying cd viewcvstest

if it is, post here the apache error log lines.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
khacduystAuthor Commented:
hi this is my mistake, viewvc.cgi not viewcvs.cgi, now it run but it report error 403 for binden, how can i config for permision ,thanks
0
 
khacduystAuthor Commented:
here my error log :

[Wed May 10 08:36:18 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed May 10 08:36:18 2006] [notice] Digest: generating secret for digest authentication ...
[Wed May 10 08:36:18 2006] [notice] Digest: done
[Wed May 10 08:36:18 2006] [notice] LDAP: Built with OpenLDAP LDAP SDK
[Wed May 10 08:36:18 2006] [notice] LDAP: SSL support unavailable
[Wed May 10 08:36:19 2006] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Wed May 10 08:36:19 2006] [notice] Apache/2.0.52 (Red Hat) configured -- resuming normal operations
[Wed May 10 08:36:23 2006] [error] [client 127.0.0.1] attempt to invoke directory as script: /var/www/html/viewcvstest/
[Wed May 10 08:36:23 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
0
 
khacduystAuthor Commented:
if i try to run this address localhost/cvs/viewvc.cgi error log is :

[Wed May 10 08:47:10 2006] [error] [client 127.0.0.1] (13)Permission denied: exec of '/var/www/html/viewcvstest/viewvc.cgi' failed
[Wed May 10 08:47:10 2006] [error] [client 127.0.0.1] Premature end of script headers: viewvc.cgi
[Wed May 10 08:47:10 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Wed May 10 08:47:16 2006] [error] [client 127.0.0.1] (13)Permission denied: exec of '/var/www/html/viewcvstest/viewvc.cgi' failed
[Wed May 10 08:47:16 2006] [error] [client 127.0.0.1] Premature end of script headers: viewvc.cgi
[Wed May 10 08:47:16 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Wed May 10 08:47:17 2006] [error] [client 127.0.0.1] (13)Permission denied: exec of '/var/www/html/viewcvstest/viewvc.cgi' failed
[Wed May 10 08:47:17 2006] [error] [client 127.0.0.1] Premature end of script headers: viewvc.cgi
0
 
m1tk4Commented:
>> Permission denied: exec of '/var/www/html/viewcvstest/viewvc.cgi' failed

That's your problem. Either apache doesn't have the rights to go to execute your viewvc.cgi or you are running SELinux and it's blocking it.
0
 
khacduystAuthor Commented:
viewvc.cgi already set permision to eveyone can exec but it alway complain  Permission denied, how can i fixed that error, i just new bie in linux
0
 
khacduystAuthor Commented:
[Wed May 10 14:46:47 2006] [error] [client 127.0.0.1]   File "/var/www/cgi-bin/cgi/viewvc.cgi", line 56, in ?
[Wed May 10 14:46:47 2006] [error] [client 127.0.0.1]    
[Wed May 10 14:46:47 2006] [error] [client 127.0.0.1] import sapi
[Wed May 10 14:46:47 2006] [error] [client 127.0.0.1] ImportError
[Wed May 10 14:46:47 2006] [error] [client 127.0.0.1] :
[Wed May 10 14:46:47 2006] [error] [client 127.0.0.1] No module named sapi
[Wed May 10 14:46:47 2006] [error] [client 127.0.0.1]
[Wed May 10 14:46:47 2006] [error] [client 127.0.0.1] Premature end of script headers: viewvc.cgi

i try to setup using another linux OS and get error like above, please help me
0
 
m1tk4Commented:
now you are a lot closer to getting it done, actually - your cgi executes but fails because some Python module is not installed. I would re-read ViewCVS installation instructions where it deals with the requirements.
0
 
khacduystAuthor Commented:
thanks for guiding me step by step,i'll try to install its requirement.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 7
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now