git - gitweb redirect to https -
git - gitweb redirect to https -
i apache noob , trying automatically redirect requests http://.com/gitweb https://.com/gitweb
i've set next /etc/apache2/conf.d/gitweb
alias /gitweb /usr/share/gitweb <directory /usr/share/gitweb> options followsymlinks +execcgi addhandler cgi-script .cgi redirect gitweb https://<myserver>.com/gitweb sslrequiressl </directory>
however maintain getting 403 forbidden notice
forbidden don't have permission access /gitweb on server. apache/2.2.22 (ubuntu) server @ dndo-gamma port 80
i don't want directories hosted server redirect; request gitweb.
my /etc/apache2/sites-enabled/000-default unchanged default
<virtualhost *:80> serveradmin webmaster@localhost documentroot /var/www <directory /> options followsymlinks allowoverride none </directory> <directory /var/www/> options indexes followsymlinks multiviews allowoverride none order allow,deny allow </directory> scriptalias /cgi-bin/ /usr/lib/cgi-bin/ <directory "/usr/lib/cgi-bin"> allowoverride none options +execcgi -multiviews +symlinksifownermatch order allow,deny allow </directory> errorlog ${apache_log_dir}/error.log # possible values include: debug, info, notice, warn, error, crit, # alert, emerg. loglevel warn customlog ${apache_log_dir}/access.log combined alias /doc/ "/usr/share/doc/" <directory "/usr/share/doc/"> options indexes multiviews followsymlinks allowoverride none order deny,allow deny allow 127.0.0.0/255.0.0.0 ::1/128 </directory> </virtualhost>
the file /etc/apache2/sites-enabled/default-ssl unchanged default ubuntu/apache2 installation.
usually utilize mod_rewrite
these kind of tasks:
<ifmodule mod_rewrite.c> rewriteengine on rewritelog "/var/log/apache2/rewrite_log" rewriterule ^/gitweb/(.*) https://%{server_name}/gitweb/%1 [r]
but not programming server-configuration; might consider asking question on serverfault.com
git redirect https apache2 gitweb
Comments
Post a Comment