[EMAIL PROTECTED] how to use reverseproxy with htaccess
Hello all, I'm new to this list and am not very experienced with apache. I wan't to use apache's reverse proxy functionality to access a webserver in my lan behind nat via ssl. But I want to restrict access to only a few users. So I have: ServerAdmin [EMAIL PROTECTED] SSLEngine on SSLOptions +StrictRequire SSLCertificateFile /etc/ssl/certs/apache.pem SSLCertificateKeyFile /etc/ssl/private/apache.pem ProxyRequests Off AddDefaultCharset off Order deny,allow Allow from all AuthType Basic AuthName "Internal Proxy" AuthUserFile /etc/apache2/htpasswd Require valid-user ProxyPass http://fry.example.org/ ProxyPassReversehttp://fry.example.org/ But it doesn't work. It seems like I can't use ProxyPass and Auth* within the same directive. What is the common way to something like this? -- Thanks Chris - The official User-To-User support forum of the Apache HTTP Server Project. See http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: [EMAIL PROTECTED] " from the digest: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [EMAIL PROTECTED] how to use reverseproxy with htaccess
On Saturday 24 May 2008 14:34:45 Eric Covener wrote: > On Sat, May 24, 2008 at 3:22 AM, Chris Cohen <[EMAIL PROTECTED]> wrote: > > > >ProxyPass http://fry.example.org/ > >ProxyPassReversehttp://fry.example.org/ > > > > Try Location instead of directory. Thank you. That worked. -- Greetings Chris - The official User-To-User support forum of the Apache HTTP Server Project. See http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: [EMAIL PROTECTED] " from the digest: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED] mod_auth_mysql questions
Hello, thanks to Eric Covener I got apache's reverse proxy working with basic htpasswd authentication. But now that it's working, I want to authenticate Apache against a mysql database with about 15 users. (I think I could write a script that syncs the database to the htpasswd file, but that is only my backup option). What I tried is: AuthType Basic AuthName "Internal Proxy" #AuthUserFile /etc/apache2/htpasswd AuthMySQL on AuthMySQL_Authoritative on AuthMySQL_Host bender.unixhosts.org AuthMySQL_User www-ext AuthMySQL_Password password AuthMySQL_DBnetwork AuthMySQL_Group_Table users AuthMySQL_Empty_Passwords off AuthMySQL_Encryption_Types MySQL Require valid-user ProxyPass http://int.unixhosts.org:8080/ ProxyPassReversehttp://int.unixhosts.org:8080/ But it just doesn't work. Nothing in the logs. I am still pretty new to all this apache stuff, so please gimme a hint :) -- Thank you Chris - The official User-To-User support forum of the Apache HTTP Server Project. See http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: [EMAIL PROTECTED] " from the digest: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [EMAIL PROTECTED] mod_auth_mysql questions
On Tuesday 03 June 2008 11:37:30 Res wrote: > Which version of Apache? later versions do not use that module. so to > get help you should to specifiy the version Sorry, forgot that. apache2-mpm-prefork (2.2.8-1ubuntu0.2) libapache2-mod-auth-mysql (4.3.9-4) -- Thanks Chris - The official User-To-User support forum of the Apache HTTP Server Project. See http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: [EMAIL PROTECTED] " from the digest: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [EMAIL PROTECTED] mod_auth_mysql questions
On Tuesday 03 June 2008 13:11:26 Res wrote: > On Tue, 3 Jun 2008, Chris Cohen wrote: > > On Tuesday 03 June 2008 11:37:30 Res wrote: > >> Which version of Apache? later versions do not use that module. so > >> to get help you should to specifiy the version > > > > Sorry, forgot that. > > apache2-mpm-prefork (2.2.8-1ubuntu0.2) > > libapache2-mod-auth-mysql (4.3.9-4) > > Who knows what debian/ubuntu do, maybe your best asking over there > since apache 2.2.(6|8) uses mod_dbd (compile time --with-mysql as > of 2.2.8, it works in 2.2.6 but is a more complicated to get it to > work, but that all changed with an agreement between mysql and apache > foundation folks for release 2.2.8) > > [configuration example] > > > To see if you have mysql recognised try: > > ldd /path/to/httpd | grep libmysqlclient_r > > You should get something like... > > ~# ldd /usr/local/apache/bin/httpd | grep libmysqlclient_r > libmysqlclient_r.so.15 => > /usr/lib/mysql/libmysqlclient_r.so.15 (0xb7d7f000) This command doesn't report anything. So no mysql support I think. I cant even find something like dbd for apache in my repo. So... its not possible with the debian/ubuntu apache? -- Thanks Chris - The official User-To-User support forum of the Apache HTTP Server Project. See http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: [EMAIL PROTECTED] " from the digest: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [EMAIL PROTECTED] mod_auth_mysql questions
On Wednesday 04 June 2008 01:22:19 Res wrote: > On Tue, 3 Jun 2008, Chris Cohen wrote: > >> ~# ldd /usr/local/apache/bin/httpd | grep libmysqlclient_r > >> libmysqlclient_r.so.15 => > >> /usr/lib/mysql/libmysqlclient_r.so.15 (0xb7d7f000) > > > > This command doesn't report anything. So no mysql support I think. > > I cant even find something like dbd for apache in my repo. > > So... its not possible with the debian/ubuntu apache? > > Sounds like it by the way they have apparently built the 2.2.8 > package. > > The first thing I'd do is backup your httpd.conf, then delete the > apache package, then get the source and build from that. If you need > a rough guide on what to do check out > http://support.ausics.net/apache.php > > The second thing I'd do is join the ubuntu lists and ask the > debian/ubuntu maintainers to for once in their lives come out of the > dark ages and use modern methods with something :) Thanks for your help Res. I'm going to build apache from source. -- Greetings Chris - The official User-To-User support forum of the Apache HTTP Server Project. See http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: [EMAIL PROTECTED] " from the digest: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED] proxypass problems
Hi all, again... I am a total apache newbie. What I have is: - A webserver in my dmz with a dedicated vhost + ip - A ssh tunnel to an internal webserver - An internal webserver with a directory called mirror in / As you might imagine I want to access the dir mirror on the dmz webserver. This is what I've tried on the dmz webserver: ServerAdmin [EMAIL PROTECTED] ProxyRequests Off Order deny,allow Allow from 10.1.0.0/16 Deny from all ProxyPass http://localhost:8080/mirror/ ProxyPassReversehttp://localhost:8080/mirror/ ... and it actually works. I can access all the files. BUT Apache is looking for /icons in the wrong directory and (what is much more annoying) the autoindex module generates wrong links. For example: I am in the dir /pub/software/ and want to go into the "Parent Directory", but the link points to /mirror/pub/ instead of /pub/. What's wrong with my configuration? -- Thank you Chris - The official User-To-User support forum of the Apache HTTP Server Project. See http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: [EMAIL PROTECTED] " from the digest: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [EMAIL PROTECTED] proxypass problems
Chris Cohen schrieb: Hi all, again... I am a total apache newbie. What I have is: - A webserver in my dmz with a dedicated vhost + ip - A ssh tunnel to an internal webserver - An internal webserver with a directory called mirror in / As you might imagine I want to access the dir mirror on the dmz webserver. This is what I've tried on the dmz webserver: ServerAdmin [EMAIL PROTECTED] ProxyRequests Off Order deny,allow Allow from 10.1.0.0/16 Deny from all ProxyPass http://localhost:8080/mirror/ ProxyPassReversehttp://localhost:8080/mirror/ ... and it actually works. I can access all the files. BUT Apache is looking for /icons in the wrong directory and (what is much more annoying) the autoindex module generates wrong links. For example: I am in the dir /pub/software/ and want to go into the "Parent Directory", but the link points to /mirror/pub/ instead of /pub/. What's wrong with my configuration? Noone this time? Just a little hint please. - The official User-To-User support forum of the Apache HTTP Server Project. See http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: [EMAIL PROTECTED] " from the digest: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [EMAIL PROTECTED] proxypass problems
On Tuesday 15 July 2008 10:31:48 Krist van Besien wrote: > On Mon, Jul 14, 2008 at 13:27, Chris Cohen <[EMAIL PROTECTED]> wrote: > > ... and it actually works. I can access all the files. BUT > > Apache is looking for /icons in the wrong directory and (what is > > much more annoying) the autoindex module generates wrong links. > > For example: > > I am in the dir /pub/software/ and want to go into the "Parent > > Directory", but the link points to /mirror/pub/ instead of /pub/. > > The links are generated by your mirror server. This mirror server > does not see requests for /pub/software but for /mirror/pub/software, > and thus generates what are, from its perspective, correct links. > > You probably though that ProxyPassReverse would fix that, but it > doesn't, as only redirects are rewritten, not the content. > > You either need to use something that rewrites the content generate > by your mirror server (but this is complicated for a newbie) or > alternatively also proxy /mirror to your mirror server. Thanks for your reply. Although it's just cosmetical I don't mind reading some docs. So, could you please point me in the right direction? What can I use to rewrite the content? mod-rewrite? - The official User-To-User support forum of the Apache HTTP Server Project. See http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: [EMAIL PROTECTED] " from the digest: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [EMAIL PROTECTED] proxypass problems
Nick Kew schrieb: On Tue, 15 Jul 2008 14:16:10 +0200 Chris Cohen <[EMAIL PROTECTED]> wrote: Thanks for your reply. Although it's just cosmetical I don't mind reading some docs. So, could you please point me in the right direction? What can I use to rewrite the content? mod-rewrite? http://www.apachetutor.org/admin/reverseproxies Thanks. I read your article two times now and have changed m configuration to the following: ServerAdmin [EMAIL PROTECTED] ProxyRequests Off ProxyPass / http://localhost:8080/mirror/ ProxyHTMLURLMap http://localhost:8080/mirror / ProxyPassReverse / SetOutputFilter proxy-html ProxyHTMLURLMap / /mirror/ ProxyHTMLURLMap /mirror / Order deny,allow Allow from 10.1.0.0/16 Deny from all Should be ok if I understood you right. But as soon as I add ProxyHTMLURLMap / /mirror/ the path is correct but the hostname removed. I get links like: http://pub/mirror instead of http://mirror.example.org/pub/mirror/. The /icons path is also still wrong. Did I understand something wrong? -- Thanks Chris - The official User-To-User support forum of the Apache HTTP Server Project. See http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: [EMAIL PROTECTED] " from the digest: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [EMAIL PROTECTED] proxypass problems
Replaying to myself... after some coffee I figured out I missed a slash. ProxyHTMLURLMap /mirror/ / and the links are ok. So theres only the icons problem left. I tried something like ProxyHTMLURLMap /mirror/icons/ /icons and ../icons but neither of them works. It looks like its getting ignored. Maybe because of the /mirror/ / rules? Apache on the internal server looks for /icons in /mirror/mirror/icons/. Thanks Chris Chris Cohen schrieb: Nick Kew schrieb: On Tue, 15 Jul 2008 14:16:10 +0200 Chris Cohen <[EMAIL PROTECTED]> wrote: Thanks for your reply. Although it's just cosmetical I don't mind reading some docs. So, could you please point me in the right direction? What can I use to rewrite the content? mod-rewrite? http://www.apachetutor.org/admin/reverseproxies Thanks. I read your article two times now and have changed m configuration to the following: ServerAdmin [EMAIL PROTECTED] ProxyRequests Off ProxyPass / http://localhost:8080/mirror/ ProxyHTMLURLMap http://localhost:8080/mirror / ProxyPassReverse / SetOutputFilter proxy-html ProxyHTMLURLMap / /mirror/ ProxyHTMLURLMap /mirror / Order deny,allow Allow from 10.1.0.0/16 Deny from all Should be ok if I understood you right. But as soon as I add ProxyHTMLURLMap / /mirror/ the path is correct but the hostname removed. I get links like: http://pub/mirror instead of http://mirror.example.org/pub/mirror/. The /icons path is also still wrong. Did I understand something wrong? - The official User-To-User support forum of the Apache HTTP Server Project. See http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: [EMAIL PROTECTED] " from the digest: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]