Re: How to redirect http to https with Apache/SVN/SSL [SOLVED]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Daniel B. Thurman wrote:
Daniel B. Thurman wrote:

I am trying to solve one last problem with my
Apache/SVN/SSL with http to http redirection.

Is it possible to do?

Here is what I have in my subversion.conf file:
=======================================
<VirtualHost host.domain.com:80>
   ServerName host.domain.com
   RequestHeader edit Destination ^http https early
   #Redirect / https://host.domain.com/
</VirtualHost>

<VirtualHost host.domain.com:443>
   [...]
</VirtualHost>
=======================================

Using the following works:
$ svn list https://host.domain.com/svn/svn1
branches/
tags/
trunk/

But using the following with either RequestHeader or Redirect fails:
$ svn list http://host.domain.com/svn/svn1
svn: PROPFIND request failed on '/svn/svn1'
svn: PROPFIND of '/svn/svn1': 405 Method Not Allowed (http://host.domain.com)

Is there a way to make this work?

Dan

After much digging on the Internet, I found the solution I wanted:

<VirtualHost host.domain.com:80>
   ServerName host.domain.com
   CustomLog /svn/Admin/logs/access.log combined
   ErrorLog  /svn/Admin/logs/error.log
   SSLProxyEngine on
   ProxyPass / https://host.domain.com/
   ProxyPassReverse / https://host.domain.com/
</VirtualHost>

<VirtualHost host.domain.com:80>
   [...]
</VirtualHost>

Dan
DRAT!  TYPO!

Should be:

<VirtualHost host.domain.com:80>
  ServerName host.domain.com
  CustomLog /svn/Admin/logs/access.log combined
  ErrorLog  /svn/Admin/logs/error.log
  SSLProxyEngine on
  ProxyPass / https://host.domain.com/
  ProxyPassReverse / https://host.domain.com/
</VirtualHost>

<VirtualHost host.domain.com:443>
  [...]
</VirtualHost>

My mistake was the 2nd VirtualHost clause where 80 should be 443:

Now, that's better ;)
Dan

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux