Re: A critical .htaccess problem

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

 



Craig Huffstetler wrote:
> Krist is correct - you need to make sure Subversion a Virtual Host.
> I'm including a few instructions as I'm sure you're all set on
> Subversion and Apache. If you're still having problems let us know.

Hello Craig and Krist,

Thanks for your guidance. Craig, the points you have mentioned here are
already done from my side when configuring the svn with https:// and it
had no problem to work with https://.  If some one still use http:// it
denied the HTTP protocol which was exactly what I need.

But the problem is to separate internet from LAN I added the following
in my .htaccess in htdocs. It ask for authentication when accessed from
internet but not from LAN

~~~~~~~~~~~~~~~~~~~~~~~~
AuthType Basic
AuthName "protected place"
AuthUserFile /home/SVN/PASSWD
Require valid-user
Order allow,deny
Allow from 192.168.1.0/24
Satisfy any
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

After adding this config the svn allow http access too !!! and I want to
deny http for svn.

Krist, I already have the vhost for svn. here is the vhost config for
svn once again

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
<Location /repos>
DAV svn

AuthType Basic
      AuthName "Authorization Realm"
      AuthUserFile /home/SVN/PASSWD
      Require valid-user
      SVNParentPath /home/SVN

#### Limit write permission to list of valid users.
  <LimitExcept GET PROPFIND OPTIONS REPORT>
#      # Require SSL connection for password protection.
SSLRequireSSL

      AuthType Basic
      AuthName "Authorization Realm"
      AuthUserFile /home/SVN/PASSWD
      Require valid-user
  </LimitExcept>
</Location>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Please suggest what to do ?
Thanks once again

>
> Also, is port 443 open on your router and is Apache listening on this
> port? Ensure nothing is blocking the port. This is the common port for
> HTTPS.
>
> 1) Make sure make the repository directory is accessible to Apache.
> For example:
> chown www-stuff:www-stuff /srv/svn/repos
>
> 2) Just create the repos and projects as normal from command-line or
> client interface (your usual method).
>
> 3) Use Virtual Hosts, as Krist indicated, for Apache.
>
> 4) If you are going to be using many projects change the SVN Path in
> your VHost file to the */repos directory instead of the project path.
> This will just make your life easier.
>
> 5) To create users to access your repository you can simply issue the
> command (to also just make life easier...). This is also where a valid
> user is needed:
> sudo htpasswd -c /etc/apache2/dav_svn.passwd username1
> /To add additional users:/
> sudo htpasswd -m /etc/apache2/dav_svn.passwd user2
> /etc./
>
> I hope this helps.
>
> Cheers,
>
> Craig Huffstetler | craig.huffstetler@xxxxxxxxx
> <mailto:%20craig.huffstetler@xxxxxxxxx>
>
> On Mon, Jan 19, 2009 at 8:52 AM, Krist van Besien
> <krist.vanbesien@xxxxxxxxx <mailto:krist.vanbesien@xxxxxxxxx>> wrote:
>
>     On Mon, Jan 19, 2009 at 8:12 AM, J. Bakshi
>     <joydeep@xxxxxxxxxxxxxxx <mailto:joydeep@xxxxxxxxxxxxxxx>> wrote:
>
>     > How can I force svn to stick with https:// along with the above
>     > .htaccess configuration ?
>     > Please enlighten me.
>
>     Make your SVN config part of your https virtual host. That way svn
>     will not be accessible via http.
>
>
>     Krist
>
>
>     --
>     krist.vanbesien@xxxxxxxxx <mailto:krist.vanbesien@xxxxxxxxx>
>     krist@xxxxxxxxxxxxx <mailto:krist@xxxxxxxxxxxxx>
>     Bremgarten b. Bern, Switzerland
>     --
>     A: It reverses the normal flow of conversation.
>     Q: What's wrong with top-posting?
>     A: Top-posting.
>     Q: What's the biggest scourge on plain text email discussions?
>
>     ---------------------------------------------------------------------
>     The official User-To-User support forum of the Apache HTTP Server
>     Project.
>     See <URL:http://httpd.apache.org/userslist.html> for more info.
>     To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>     <mailto:users-unsubscribe@xxxxxxxxxxxxxxxx>
>       "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
>     <mailto:users-digest-unsubscribe@xxxxxxxxxxxxxxxx>
>     For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>     <mailto:users-help@xxxxxxxxxxxxxxxx>
>
>


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Joydeep Bakshi, Linux System Admin
Kolkatainfoservices Pvt Ltd,
23A Royd Street, Kolkata 700016, India
Work Phone 91 033 40014784
http://infoservices.in/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux