[users@httpd] port redirecting mapping

2014-02-10 Thread varun

Is it possible to redirect a request for one port to another one.
Say a request like *http://domain_name:3030* be accepted and
redirected/mapped, so that the server should be able to process the
request like*http://domain_name:3000*. And a direct request like 
*http://domain_name:3000*

should be restricted.
Is there any modules, directive in apache. I am new to apache. On Ubuntu 
12.04.


Re: [users@httpd] port redirecting mapping

2014-02-10 Thread Thomas Eckert
Assuming you have a working config for a server/vhost on domain_name:3030,
then how about
  Redirect permanent / http://domain_name:3000/
? See http://httpd.apache.org/docs/current/mod/mod_alias.html#redirect and
friends.

Restricted access is a bit vague but
http://httpd.apache.org/docs/current/howto/access.html is a good start.



On Mon, Feb 10, 2014 at 12:58 PM, varun varun.bhuvanend...@gmail.comwrote:

  Is it possible to redirect a request for one port to another one.
 Say a request like *http://domain_name:3030 http://domain_name:3030* be
 accepted and
 redirected/mapped, so that the server should be able to process the
 request like* http://domain_name:3000 http://domain_name:3000*. And a
 direct request like *http://domain_name:3000 http://domain_name:3000*
 should be restricted.
 Is there any modules, directive in apache. I am new to apache. On Ubuntu
 12.04.



[users@httpd] Fwd: How to serve next page requested by a user in the same language than the last one served to that user.

2014-02-10 Thread Didier Spaier

Hi there,

I run a the polyglot website http://slint.fr.

Currently I add a language code to the requested URL according to the
AcceptLanguage header, but this information doesn't always match user wish
and I was told that serving different filenames for the same requested URI
can prevent proper pages indexing by search engines.

So, I will now store web pages in each language in a specific directory,
e.g. subdirectories en, it ru, tr, etc. For instance /tr/index.html is
in Turkish but /fr/index.html is in French

On every page, user can change language clicking on an hyperlink to a
page in corresponding directory (provided the same page exists in that
language, of course).

I want that when a user has requested a localized page (i.e. in a
directory other than /en), request of pages from the same user that not
include a per language directory in their path be rewritten to the page
with the requested filename in the same directory if it exists, else to
the page with the same filename in the /en directory.

I know that I could set a cookie or use HTTP-REFERER for that, but
possibly the  browser can be set to refuse cookies or not sent the Referer
HTTP header so I'd prefer to avoid that.

So my question is : knowing that when a user clicks on a language link we
serve a  page in the corresponding directory, how could I reuse that
information  for next request of the same client (same IP address),
including it in a RewriteCond directive so that I can serve requested
page in the same language directory, if that page exists there.

I have considered SetEnvIf directive like this one:
SetEnvIf Request_URI ^/slint.fr/(bs|de|el|en|es|fr|id)/.*$ IP.LANG=$1
but do not know the variable name IIP.LANG cna be set as the Remote_Addr.

I have also considered scanning the access log, to find that information
I don't know any way to do that.

I wish to avoid server side scripting (at present the website is 100%
static).

Thanks in advance for any clue.

Cheers, Didier



-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] port redirecting mapping

2014-02-10 Thread varun
I am trying to redirect a link with a port number to another link. I had 
tried this with the intention

that all requests ending with :3030/ should be mapped to http://domain_name/

*Proxy ***
**Order allow,deny**
**Allow from all**
**/Proxy**
**ProxyPass :3030/ http://domain_name/**
**ProxyPassReverse :3030/ http://domain_name/*
This is not working, as a request like http://domain:3030 is not 
redirecting.


But when i tries
ProxyPass / http://domain_name:3030/
ProxyPassReverse / http://domain_name:3030/
A request like this *http://domain_name* redirects to 
*http://domain_name:3030*


Also tries Redirect
*Redirect :3030 http://domain_name*

rewrite_module is enabled.

Is there any config error or the approach is bad.

On Monday 10 February 2014 06:21 PM, Thomas Eckert wrote:
Assuming you have a working config for a server/vhost on 
domain_name:3030, then how about

  Redirect permanent / http://domain_name:3000/
? See http://httpd.apache.org/docs/current/mod/mod_alias.html#redirect 
and friends.


Restricted access is a bit vague but 
http://httpd.apache.org/docs/current/howto/access.html is a good start.




On Mon, Feb 10, 2014 at 12:58 PM, varun varun.bhuvanend...@gmail.com 
mailto:varun.bhuvanend...@gmail.com wrote:


Is it possible to redirect a request for one port to another one.
Say a request like *http://domain_name:3030* be accepted and
redirected/mapped, so that the server should be able to process the
request like*http://domain_name:3000*. And a direct request like
*http://domain_name:3000*
should be restricted.
Is there any modules, directive in apache. I am new to apache. On
Ubuntu 12.04.




--
kind regards
varun http://varun.bounceme.net/


[users@httpd] All connections passed on to app server?

2014-02-10 Thread Tony Anecito
Hi All,
 
I am curious if say a browser establishes 4 connections to Apache web server if 
all those four connections are passed onto the app server? Or does Appache 
establish only say one connection to the app aserver but still make the four 
requests to the app server?
 
Just wondering.
 
Thanks,
-Tony

Re: [users@httpd] RewriteEngine

2014-02-10 Thread Eric K. Dickinson

Thank you very much.
I gave it a go... Still no Joy, the attempts at directory recursion 
still end up in the access log...


More reading.

eric

On 02/07/2014 10:31 AM, Michael Streeter wrote:

On 1/28/2014 10:09 AM, Eric K. Dickinson wrote:

Good Morning.

We have a bunch of WordPress sites.
We also have a requirement to be scanned by Nessus and AppScan.
This drives the caching on WordPress nuts.

I have been able to significantly reduce this with a ReWriteRule.

RewriteEngine on
RewriteRule .*\.(dll|ini|exe|com)$ - [R=404,NC]
RewriteRule .*(etc\/passwd)$ - [R=404,NC]


It has helped a lot.

However...
RewriteRule *(\/..\/..\/..\/..\/)* - [R=404,NC]
RewriteRule *(\\...\\...\\...\\)* - [R=404,NC]


Has Not.

It looks like there are a couple of problems.  In a regex, * means match
zero or more of the previous character.  So beginning with a * is a
regex error.  Also, since your pattern is in a capture group followed by
a *, it says to match zero or more of the entire pattern.  Since a .
matches any character, we'll quote the . characters in the regex to
exactly match the . characters.  Try something like this:

RewriteRule .*\.\.\/\.\.\/\.\.\/\.\..* - [R=404]
RewriteRule .*\.\.\.\\\.\.\.\\\.\.\.\\\.\.\..* - [R=404]

The second problem is that sometimes what you're trying to match is in
the query string, which the pattern matching in a RewriteRule doesn't
look at.  Instead, add a RewriteCond that looks at the query string:

RewriteCond %{QUERY_STRING} .*\.\.\/\.\.\/\.\.\/\.\..*
RewriteRule .* - [R=404]

RewriteCond %{QUERY_STRING} .*\.\.\.\\\.\.\.\\\.\.\.\\\.\.\..*
RewriteRule .* - [R=404]

Hope that helps,
Michael S

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[users@httpd] Re: reverse proxy choice to origin servers: https-https or https-http

2014-02-10 Thread Jakub Moscicki

Is it true that if proxy is setup https-http then it only has to
decrypt/encrypt the headers and the body is encrypted/decrypted on the backend?
What ? Eh, no. If you configure your frontend with https and your backends with 
http, then you just told apache to NOT use SSL between mod_proxy and the 
backend servers. Only your frontends will do SSL handshakes in this setup. 
That's pretty much SSL Offloading, maybe you got that confused ?


Sorry, it was a typo of course. I mean: https-https. So if a proxy forwards 
https to the backend which accepts https - then would the proxy decrypt the 
headers only or the entire request? I am adding cookies at the proxy for 
stickyness so the proxy must be handling the headers.

In my case http at the backend could be an option inside a trusted network.

kuba

--



RE: [users@httpd] RE: Having issues trying to use rewriterule,proxypass,proxyreversepass

2014-02-10 Thread Riggen, Scott
Tom,

I put port# in to indicate that we are using a different port than standard on 
the inside network/server.
In this case it is an Oracle SOA server on port 7011.
I can assure you that none of my actual rules contains or begins with a # sign.

I'm still not sure why my rewrite rules are not working and have been banging 
on this for a few days now.

Scott

 i.e. https://myserver.mydomain.com/dir1/dir2/login.jspx gets proxied 
 to http://internalserver.mydomain.com:port#/dir1/dir2/login.jspx

Anything after a '#' in a URL is browser state, the browser neither sends nor 
receives this data from a server.

It's also the comment character in httpd config files, so god knows what that 
rule does.

Cheers

Tom

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org


Re: [users@httpd] RE: Having issues trying to use rewriterule,proxypass,proxyreversepass

2014-02-10 Thread Tom Evans
On Mon, Feb 10, 2014 at 4:39 PM, Riggen, Scott
scott.rig...@escocorp.com wrote:
 Tom,

 I put port# in to indicate that we are using a different port than standard 
 on the inside network/server.
 In this case it is an Oracle SOA server on port 7011.
 I can assure you that none of my actual rules contains or begins with a # 
 sign.

 I'm still not sure why my rewrite rules are not working and have been banging 
 on this for a few days now.

 Scott


Two things:

1) Post actual configs. If I don't know whether what you are saying is
what you are running, it is very hard to speculate what is going
wrong.
2) Turn on the rewrite log at level 5 or above. Identify a request
which does not redirect correctly and look at why.

Actually a few more:

then I think I need ProxyReversePass to get traffic back to the client.

Mmm - no. ProxyPassReverse rewrites certain headers. If your backend
web-app does a redirect, and the redirect doesn't work/leaves your
browser somewhere funny, then your ProxyPassReverse is incorrect. If
your request never makes it to your backend, then ProxyPassReverse is
never coming in to play.

Proxying via rewrite rules is trickier than just using ProxyPass. Why
not use ProxyPass?

Proxying to different paths is trickier than proxying to the same
path. Why proxy / to /dir1/dir2/login.aspx, when you can just proxy
/dir1/dir2/ to /dir1/dir2/ and use a redirect on the proxy to send
people who go to / to the right location.

Make it easy, make it work, then make it work how you want. Also turn
on and read the logs if you persist with rewrite.

Cheers

Tom

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



RE: [users@httpd] RE: Having issues trying to use rewriterule,proxypass,proxyreversepass

2014-02-10 Thread Riggen, Scott
Tom,

Here is my actual 3 config lines.
RewriteRule ^/$ 
https://volunteermatchbu.escocorp.com/esco_vm-ViewController-context-root/faces/login.jspx
 [R,L]
RewriteRule ^/esco_vm-ViewController-context-root/faces/(.*) 
http://certsoamt.escocorp.com:7011/esco_vm-ViewController-context-root/faces/$1 
[P]
ProxyPassReverse /esco_vm-ViewController-context-root/faces/ 
http://certsoamt.escocorp.com:7011/esco_vm-ViewController-context-root/faces/

I already have the debug log level at 9.

I don't control the back end server but from what I can tell you cannot land on 
anything other than the actual login.jspx to get a login page.

I have a working reverseproxy config for another internal server but that is 
not an Oracle SOA server and when I duplicated this working ruleset and changed 
my particulars it did not work.
Here is that those configs looks like.

  RewriteRule ^/$ 
https://iservicecert.escocorp.com/OA_HTML/AppsLocalLogin.jsp$1 [R,L]
#
  RewriteRule ^/OA_HTML/(.*)  http://drsswa12.escocorp.com:8018/OA_HTML/$1 
[P]
  ProxyPassReverse /OA_HTML/  http://drsswa12.escocorp.com:8018/OA_HTML/

At this point I'd use any config that would work.
The online samples and even the apache docs are a pin to decipher as far as I 
am concerned.

Scott

-Original Message-
From: Tom Evans [mailto:tevans...@googlemail.com] 
Sent: Monday, February 10, 2014 8:48 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] RE: Having issues trying to use 
rewriterule,proxypass,proxyreversepass

On Mon, Feb 10, 2014 at 4:39 PM, Riggen, Scott scott.rig...@escocorp.com 
wrote:
 Tom,

 I put port# in to indicate that we are using a different port than standard 
 on the inside network/server.
 In this case it is an Oracle SOA server on port 7011.
 I can assure you that none of my actual rules contains or begins with a # 
 sign.

 I'm still not sure why my rewrite rules are not working and have been banging 
 on this for a few days now.

 Scott


Two things:

1) Post actual configs. If I don't know whether what you are saying is what you 
are running, it is very hard to speculate what is going wrong.
2) Turn on the rewrite log at level 5 or above. Identify a request which does 
not redirect correctly and look at why.

Actually a few more:

then I think I need ProxyReversePass to get traffic back to the client.

Mmm - no. ProxyPassReverse rewrites certain headers. If your backend web-app 
does a redirect, and the redirect doesn't work/leaves your browser somewhere 
funny, then your ProxyPassReverse is incorrect. If your request never makes it 
to your backend, then ProxyPassReverse is never coming in to play.

Proxying via rewrite rules is trickier than just using ProxyPass. Why not use 
ProxyPass?

Proxying to different paths is trickier than proxying to the same path. Why 
proxy / to /dir1/dir2/login.aspx, when you can just proxy /dir1/dir2/ to 
/dir1/dir2/ and use a redirect on the proxy to send people who go to / to the 
right location.

Make it easy, make it work, then make it work how you want. Also turn on and 
read the logs if you persist with rewrite.

Cheers

Tom

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org


[users@httpd] OT - Call for speakers announcements?

2014-02-10 Thread CS DBA

Hi All;

We're hosting a conference in April and we're looking for speakers 
(www.opendatasummit.com).


Would it be appropriate to post the call for speakers announcement here? 
or is there a better list?


Thanks in advance

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] OT - Call for speakers announcements?

2014-02-10 Thread Rich Bowen


On 02/10/2014 01:27 PM, CS DBA wrote:

Hi All;

We're hosting a conference in April and we're looking for speakers 
(www.opendatasummit.com).


Would it be appropriate to post the call for speakers announcement 
here? or is there a better list?


Thanks in advance


It appears that you just did. ;-)

As it happens, we (the Apache Software Foundation) are also having a 
conference in Denver that same week, so the possibilities for someone to 
speak at one event and then the other seem pretty good.


As to whether there's a better list, I guess it depends on what kind of 
talk you're looking for, and whether the httpd crowd is the source of 
those. Could be that some of the other projects around Big Data might 
also be a good place to ask.


--
Rich Bowen - rbo...@rcbowen.com - @rbowen
http://apachecon.com/ - @apachecon


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] OT - Call for speakers announcements?

2014-02-10 Thread CS DBA

On 2/10/14, 11:50 AM, Rich Bowen wrote:


On 02/10/2014 01:27 PM, CS DBA wrote:

Hi All;

We're hosting a conference in April and we're looking for speakers 
(www.opendatasummit.com).


Would it be appropriate to post the call for speakers announcement 
here? or is there a better list?


Thanks in advance


It appears that you just did. ;-)

As it happens, we (the Apache Software Foundation) are also having a 
conference in Denver that same week, so the possibilities for someone 
to speak at one event and then the other seem pretty good.


As to whether there's a better list, I guess it depends on what kind 
of talk you're looking for, and whether the httpd crowd is the source 
of those. Could be that some of the other projects around Big Data 
might also be a good place to ask.



Great! Thanks for the feedback.



-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[users@httpd] Virtual Host Not Working

2014-02-10 Thread Jim Borland
My server, which is located in the Amazon cloud, was just moved to a new 
location with a new IP address.  Nothing else was changed. However, the 
Apache Virtual Host, which has worked flawlessly for several years, is 
broken.  Apache server version is: Apache/2.2.16 (Ubuntu).


I went to my DNS host and changed the names to point to the new IP 
address.  But now, when I go to the hostname in my browser I end up at 
the default site instead of the one specified for the virtual host.  
Here is my config file (httpd-vhosts.conf).




NameVirtualHost 75.101.136.229

VirtualHost 75.101.136.229
ServerAdmin jborlan...@gmail.com
ServerName ec2-75-101-136-229.compute-1.amazonaws.com
DocumentRoot /var/www
/VirtualHost

Directory /home/jim
   Order allow,deny
   Allow from all
/Directory

VirtualHost 75.101.136.229
ServerName atascaderoband.org
ServerAlias www.atascaderoband.org
DocumentRoot /home/jim/atasband
/VirtualHost

VirtualHost 75.101.136.229
ServerName www.slocountyband.org
ServerAlias slocountyband.org
DocumentRoot /home/jim/band
/VirtualHost



When I point my browser to atascaderoband.org or slocountyband.org I end 
up at: DocumentRoot /var/www instead of the ones specified for the two 
virtual hosts.


What really confuses me is that Apache says the virtual hosts are okay.  
When I type the command 'apachectl -S' I get this result:




# apachectl -S
VirtualHost configuration:
75.101.136.229:*   is a NameVirtualHost
   default server ec2-75-101-136-229.compute-1.amazonaws.com 
(/etc/apache2/sites-enabled/httpd-vhosts.conf:3)
   port * namevhost ec2-75-101-136-229.compute-1.amazonaws.com 
(/etc/apache2/sites-enabled/httpd-vhosts.conf:3)
   port * namevhost atascaderoband.org 
(/etc/apache2/sites-enabled/httpd-vhosts.conf:22)
   port * namevhost www.slocountyband.org 
(/etc/apache2/sites-enabled/httpd-vhosts.conf:31)

wildcard NameVirtualHosts and _default_ servers:
*:80   is a NameVirtualHost
   default server domU-12-31-39-04-58-57.compute-1.internal 
(/etc/apache2/sites-enabled/000-default:1)
   port 80 namevhost domU-12-31-39-04-58-57.compute-1.internal 
(/etc/apache2/sites-enabled/000-default:1)




Any thoughts or suggestions would be greatly appreciated.  Thank you!


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] RewriteEngine

2014-02-10 Thread Michael Streeter

On 2/10/2014 8:04 AM, Eric K. Dickinson wrote:

Thank you very much.
I gave it a go... Still no Joy, the attempts at directory recursion 
still end up in the access log...


More reading.

eric

Sorry to hear that.  A couple of things that help me, and may help in 
your troubleshooting are:
1) Turn on rewrite logging if you're able to and haven't already. The 
procedure is slightly different for newer versions of Apache, so the 
exact steps depend on your Apache version.
2) To test regular expressions, check out pcretest.  It is bundled with 
the pcre library which is the same library Apache uses for regular 
expressions.


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[users@httpd] OT: Internet against surveillance / Internet gegen Überwachung

2014-02-10 Thread Peter Kühnlein

Apologies for any inconvenience
Ich entschuldige mich für die Störung

--

Today is the day of action against surveillance by governments and their 
secret services. Sign the petition and put a banner on your websites to 
show awareness of the anti-democratic development.


https://en.necessaryandproportionate.org/take-action/privacyinternational#share

--

Heute ist der Aktionstag gegen Überwachung durch Regierungen und ihre 
Geheimdienste. Zeichnet die Petition und setzt ein Banner auf euere 
Websites, um zu zeigen, dass die anti-demokratische Entwicklung nicht 
unbemerkt bleibt.


https://en.necessaryandproportionate.org/take-action/privacyinternational#share

--

Regards, Peter
Danke, Peter

--

http://function2form.net
http://peter-kuehnlein.net

It is a good viewpoint to see the world as a dream. When you have something like a 
nightmare, you will wake up and tell yourself that it was only a dream. It is said that 
the world we live in is not a bit different from this.
(Hagakure)