[users@httpd] Issue with Files and/or FilesMatch Directive
Dear Apache users, I have Apache 2.2.3 on my test server. I have following configuration for testing site, which is running on Tomcat - Apache is a proxy for Tomcat: - VirtualHost testing.domain.com:80 DefaultType text/html ProxyRequests Off ProxyPreserveHost On Proxy * Order deny,allow Allow from all /Proxy ServerName testing.domain.com ProxyPass /scans http://localhost:8081/scans ProxyPassReverse/scans http://localhost:8081/scans ProxyPass /web http://localhost:8081/web ProxyPassReverse/web http://localhost:8081/web FilesMatch ^\.xml Order deny,allow Deny from all /FilesMatch /VirtualHost - Currently my main goal is to block every request to *.xml file. For this purposes I've created FilesMatch rule, which is present at the end of the above configuration. Unfortunately it doesn't work, I have still access to xml files across server. Where I am making a mistake? What is wrong with above configuration? Thank you in advance for any help. Best Regards -- Piotr Pawlowski - 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-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Issue with Files and/or FilesMatch Directive
Currently my main goal is to block every request to *.xml file. For this purposes I've created FilesMatch rule, which is present at the end of the above configuration. Unfortunately it doesn't work, I have still access to xml files across server. Where I am making a mistake? What is wrong with above configuration? Thank you in advance for any help. Files applies to content served out of the filesystem only, and you did not actually have a .+ or .* in your regex. - 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-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Issue with Files and/or FilesMatch Directive
On Mon, 30 Jan 2012 13:40:45 + Piotr Pawłowski piotr.pawlow...@goyello.com wrote: Currently my main goal is to block every request to *.xml file. The clue is in the name. FilesMatch applies to files, not to proxied requests. Get rid of the Proxy and Filesmatch sections and use Location. -- Nick Kew - 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-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Doubt or problem with redirect - Help please.
On 25.01.12 19:03, Mathijs wrote: Some possible solutions to this, assuming www.someaddress.com has a virtualhost: Simplest way is with a redirect: VirtualHost *:80 ServerName www.someaddress.com Redirect / http://www.otheraddres.com?mode=1 /VirtualHost RedirectMatch /.* http://www.otheraddres.com?mode=1 would be safer - your example redirects http://www.someaddress.com/blah to http://www.otheraddres.com?mode=1blah - Redirect replaces strings. Instead of using ProxyPass you can use mod_rewrite as well: VirtualHost *:80 ServerName www.someaddress.com RewriteRule ^.*$ http://www.otheraddres.com?mode=1 [P] /VirtualHost This is just the same as the RedirectMatch above, just using different module (I think it's less effective). -- Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/ Warning: I wish NOT to receive e-mail advertising to this address. Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu. Linux IS user friendly, it's just selective who its friends are... - 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-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] How to make Apache mod_deflate and Transfer-encoding : Chunked work together?
On 1/27/2012 2:50 PM, sameer shah wrote: As you can see in above 2 headers chunking is working only if the compression is turned off. On 27.01.12 15:37, William A. Rowe Jr. wrote: Chunking is not a feature that the client gets to choose. Your client code is badly written if it is that fragile. It has to be able to tolerate either of Content-Length or Transfer-Encoding. You don't have command or control of the mechanism used if you are an HTTP/1.1 client. It is always the server's choice. You can however send HTTP/1.0 request with which the server MUST NOT send chunked response. -- Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/ Warning: I wish NOT to receive e-mail advertising to this address. Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu. Linux is like a teepee: no Windows, no Gates and an apache inside... - 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-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Re: IE8 thinks SHTML is text.html
Content-Type: text.html On 28.01.12 12:25, Christos Jonathan Hayward wrote: Yes; I was wondering what was causing that. It turned out that ssl.conf was giving a content-type of text.html. now this is one of reasons why I think that the server config should NOT be splitted to different files unless really needed. -- Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/ Warning: I wish NOT to receive e-mail advertising to this address. Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu. To Boot or not to Boot, that's the question. [WD1270 Caviar] - 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-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
RE: [users@httpd] Issue with Files and/or FilesMatch Directive
Hi Nick, Thank you for the response. I thought, that 'Location' directive doesn't work for file. How it should be configured correctly to block only XML files? Thanks in advance for a help. Best Regards -- Piotr Pawlowski From: Nick Kew [n...@webthing.com] Sent: Monday, January 30, 2012 14:55 To: users@httpd.apache.org Subject: Re: [users@httpd] Issue with Files and/or FilesMatch Directive On Mon, 30 Jan 2012 13:40:45 + Piotr Pawłowski piotr.pawlow...@goyello.com wrote: Currently my main goal is to block every request to *.xml file. The clue is in the name. FilesMatch applies to files, not to proxied requests. Get rid of the Proxy and Filesmatch sections and use Location. -- Nick Kew - 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-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org - 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-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
RE: [users@httpd] Issue with Files and/or FilesMatch Directive
OK, I've got it (quite simple) : LocationMatch .xml /LocationMatch Thank you all for a help, case closed. Best Regards -- Piotr Pawlowski From: Piotr Pawłowski [piotr.pawlow...@goyello.com] Sent: Monday, January 30, 2012 15:53 To: users@httpd.apache.org Subject: RE: [users@httpd] Issue with Files and/or FilesMatch Directive Hi Nick, Thank you for the response. I thought, that 'Location' directive doesn't work for file. How it should be configured correctly to block only XML files? Thanks in advance for a help. Best Regards -- Piotr Pawlowski From: Nick Kew [n...@webthing.com] Sent: Monday, January 30, 2012 14:55 To: users@httpd.apache.org Subject: Re: [users@httpd] Issue with Files and/or FilesMatch Directive On Mon, 30 Jan 2012 13:40:45 + Piotr Pawłowski piotr.pawlow...@goyello.com wrote: Currently my main goal is to block every request to *.xml file. The clue is in the name. FilesMatch applies to files, not to proxied requests. Get rid of the Proxy and Filesmatch sections and use Location. -- Nick Kew - 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-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org - 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-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org - 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-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Issue with Files and/or FilesMatch Directive
2012/1/30 Piotr Pawłowski piotr.pawlow...@goyello.com: OK, I've got it (quite simple) : LocationMatch .xml /LocationMatch maybe \.xml$ to be safe? -- Eric Covener cove...@gmail.com - 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-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] How to make Apache mod_deflate and Transfer-encoding : Chunked work together?
On 1/30/2012 8:30 AM, Matus UHLAR - fantomas wrote: On 1/27/2012 2:50 PM, sameer shah wrote: As you can see in above 2 headers chunking is working only if the compression is turned off. On 27.01.12 15:37, William A. Rowe Jr. wrote: Chunking is not a feature that the client gets to choose. Your client code is badly written if it is that fragile. It has to be able to tolerate either of Content-Length or Transfer-Encoding. You don't have command or control of the mechanism used if you are an HTTP/1.1 client. It is always the server's choice. You can however send HTTP/1.0 request with which the server MUST NOT send chunked response. However, it need not send Content-Length either. If the C-L could not be determined, keepalives would not be honored, and you would be stuck in connection-per-request mode. - 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-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
[users@httpd] rewrite engine shows text instead of executes script
To the best to my memory, the following .htaccess worked on linux, but on OSX, the result is that the browser gives me the text of the script, rather the output of the script. FYI: The script is fully functional when requested via cgi-bin. # .htaccess RewriteEngine On DirectoryIndex journalLoader.py RewriteCond $1 !^(journalLoader\.py|images|css|js|robots\.txt|favicon\.ico) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ ./journalLoader.py/$1 [L,QSA] # /.htaccess the script journalLoader.py is at the path http://linus.johnson.com/cgi-bin/baker/journal/journalLoader.py (internal search domain) and when requested provides the output I expect. The directory/folder contain journalLoader.py is symlinked to my wwwroot directory. When I point my browser to http://linus.johnson.com/journal !! The server gives me the text for the script rather than the output !! I'm woefully underinformed when it comes to .htaccess and mode rewrite, but it occurs to me that if this works on a linux box and not the the OSX platform, some configuration is need for Apache? What would that be? thanks -- Tim tim at tee jay forty nine dot com or akwebsoft dot com http://www.akwebsoft.com - 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-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] rewrite engine shows text instead of executes script
You need to tell apache you want it to handle the pyton files as scripts not as html/text files. AddHandler cgi-script .cgi .pl .py You (or someone else) have probably done that on linux but you are not aware or have forgotten about it. Igor On Tue, Jan 31, 2012 at 10:18 AM, Tim Johnson t...@akwebsoft.com wrote: To the best to my memory, the following .htaccess worked on linux, but on OSX, the result is that the browser gives me the text of the script, rather the output of the script. FYI: The script is fully functional when requested via cgi-bin. # .htaccess RewriteEngine On DirectoryIndex journalLoader.py RewriteCond $1 !^(journalLoader\.py|images|css|js|robots\.txt|favicon\.ico) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ ./journalLoader.py/$1 [L,QSA] # /.htaccess the script journalLoader.py is at the path http://linus.johnson.com/cgi-bin/baker/journal/journalLoader.py (internal search domain) and when requested provides the output I expect. The directory/folder contain journalLoader.py is symlinked to my wwwroot directory. When I point my browser to http://linus.johnson.com/journal !! The server gives me the text for the script rather than the output !! I'm woefully underinformed when it comes to .htaccess and mode rewrite, but it occurs to me that if this works on a linux box and not the the OSX platform, some configuration is need for Apache? What would that be? thanks -- Tim tim at tee jay forty nine dot com or akwebsoft dot com http://www.akwebsoft.com - 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-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] rewrite engine shows text instead of executes script
Plus if the journalLoader.py is a script then the directive DirectoryIndex journalLoader.py doesn't make any sense to me. On Tue, Jan 31, 2012 at 11:59 AM, Igor Cicimov icici...@gmail.com wrote: You need to tell apache you want it to handle the pyton files as scripts not as html/text files. AddHandler cgi-script .cgi .pl .py You (or someone else) have probably done that on linux but you are not aware or have forgotten about it. Igor On Tue, Jan 31, 2012 at 10:18 AM, Tim Johnson t...@akwebsoft.com wrote: To the best to my memory, the following .htaccess worked on linux, but on OSX, the result is that the browser gives me the text of the script, rather the output of the script. FYI: The script is fully functional when requested via cgi-bin. # .htaccess RewriteEngine On DirectoryIndex journalLoader.py RewriteCond $1 !^(journalLoader\.py|images|css|js|robots\.txt|favicon\.ico) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ ./journalLoader.py/$1 [L,QSA] # /.htaccess the script journalLoader.py is at the path http://linus.johnson.com/cgi-bin/baker/journal/journalLoader.py (internal search domain) and when requested provides the output I expect. The directory/folder contain journalLoader.py is symlinked to my wwwroot directory. When I point my browser to http://linus.johnson.com/journal !! The server gives me the text for the script rather than the output !! I'm woefully underinformed when it comes to .htaccess and mode rewrite, but it occurs to me that if this works on a linux box and not the the OSX platform, some configuration is need for Apache? What would that be? thanks -- Tim tim at tee jay forty nine dot com or akwebsoft dot com http://www.akwebsoft.com - 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-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
[users@httpd] reverse proxy / extfilter not working
Gents, This appears to be a common issue Whilst you are able to execute ExtFilters on local files, a Reverse Proxy configuration does not work the same way. This has been reported here: http://objectmix.com/apache/706472-proxypass-extfilter.html Config: VirtualHost *:80 ServerAdmin webmas...@domain.com DocumentRoot /usr/local/apache/htdocs/ ServerName search.domain.com ServerAlias search.domain.com ErrorLog logs/search.domain.com-error_log CustomLog logs/search.domain.com-access.log combined Proxy balancer://domain.com BalancerMember http://ip1 BalancerMember http://ip2 /Proxy ExtFilterDefine fixtext mode=output intype=text/html cmd=/bin/sed s/html/HTML/ig SetOutputFilter fixtext RewriteEngine on ProxyPass / balancer://domain.com/ ProxyPassReverse / balancer://domain.com/ /VirtualHost I am completely out of thoughts on this matter. If you guys could help, that would be wonderful Thanks! Vasiliy PS Removing the revproxy, and things work like a charm.
Re: [users@httpd] rewrite engine shows text instead of executes script
* Igor Cicimov icici...@gmail.com [120130 16:10]: You need to tell apache you want it to handle the pyton files as scripts not as html/text files. AddHandler cgi-script .cgi .pl .py You (or someone else) have probably done that on linux but you are not aware or have forgotten about it. Thanks Igor, you have put me on the hunt. More later cheers -- Tim tim at tee jay forty nine dot com or akwebsoft dot com http://www.akwebsoft.com - 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-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] rewrite engine shows text instead of executes script
* Igor Cicimov icici...@gmail.com [120130 16:10]: You need to tell apache you want it to handle the pyton files as scripts not as html/text files. AddHandler cgi-script .cgi .pl .py You (or someone else) have probably done that on linux but you are not aware or have forgotten about it. Yup. Here we have it: in /etc/apache2/httpd.conf added the following: AddHandler cgi-script .py restarted apache /usr/sbin/apachectl restart (That's for OSX/darwin/bsd flavor, differs on linux) And now .htaccess looks like this: # begin .htacces AcceptPathInfo On Options +ExecCGI DirectoryIndex journalLoader.py RewriteEngine on RewriteCond $1 !^(journalLoader\.py|images|css|js|robots\.txt|favicon\.ico) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ ./journalLoader.py/$1 [L,QSA] # end .htacces Note that pathinfo is critical for me, as virtual document path segments map to controllers, views and methods Thanks for the tip! Any other constructive criticisms or suggestions are welcome. cheers -- Tim tim at tee jay forty nine dot com or akwebsoft dot com http://www.akwebsoft.com - 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-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] rewrite engine shows text instead of executes script
* Igor Cicimov icici...@gmail.com [120130 16:10]: Plus if the journalLoader.py is a script then the directive DirectoryIndex journalLoader.py If I eliminate it, then I just a get an index page.. -- Tim tim at tee jay forty nine dot com or akwebsoft dot com http://www.akwebsoft.com - 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-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] rewrite engine shows text instead of executes script
If I eliminate it, then I just a get an index page.. Correct, and in that index.html page you call or redirect to your pyton script. That's the proper way to do it so you keep your web pages structure separate from your cgi scripts that live in a separate directory cgi-bin. On Tue, Jan 31, 2012 at 1:10 PM, Tim Johnson t...@akwebsoft.com wrote: * Igor Cicimov icici...@gmail.com [120130 16:10]: Plus if the journalLoader.py is a script then the directive DirectoryIndex journalLoader.py If I eliminate it, then I just a get an index page.. -- Tim tim at tee jay forty nine dot com or akwebsoft dot com http://www.akwebsoft.com - 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-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] reverse proxy / extfilter not working
On 31 Jan 2012, at 01:09, V B wrote: Gents, This appears to be a common issue Why? Because someone posts on some forum? ExtFilterDefine fixtext mode=output intype=text/html cmd=/bin/sed s/html/HTML/ig SetOutputFilter fixtext (a) Why on Earth would you incur the huge overhead of an extfilter for something that's fully supported by a choice of regular filters? (b) What happens if you use mod_filter in place of SetOutputFilter? (b) is a genuine question - it could be connected with what you describe, but without observing it myself I don't know. -- Nick Kew - 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-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org