[EMAIL PROTECTED] Check and drop http request at Apache proxy
Hi List, I need to host a proxy server on the open Internet and handle only authenticated requests. I have an apache in-filter that reads the request headers and checks for the authentication key in the headers. Once authentication is successful the module lets the request through. If authentication fails, I respond by putting a dummy web page. Now, is there a way to drop requests whose authentication fails? Regards, Harsha *** The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. This email does not constitute any commitment from Cordys Holding BV or any of its subsidiaries except when expressly agreed in a written agreement between the intended recipient and Cordys Holding BV or its subsidiaries. *** - 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] Redirect HTTPS --> HTTP
Here is the output of log level 9: 70.104.12.9 - - [30/Nov/2007:12:15:49 --0800] [www.domain.com/sid#5585b900][rid#55b01ad0/initial/redir#1] (4) RewriteCond: input='{SERVER_PORT}' pattern='=81' => not-matched 70.104.12.9 - - [30/Nov/2007:12:15:49 --0800] [www. domain.com/sid#5585b900][rid#55b01ad0/initial/redir#1] (3) applying pattern '^.*$' to uri '/error/HTTP_NOT_FOUND.html.var' 70.104.12.9 - - [30/Nov/2007:12:15:49 --0800] [www. domain.com/sid#5585b900][rid#55b01ad0/initial/redir#1] (4) RewriteCond: input='{SERVER_PORT}' pattern='=81' => not-matched 70.104.12.9 - - [30/Nov/2007:12:15:49 --0800] [www. domain.com/sid#5585b900][rid#55b01ad0/initial/redir#1] (3) applying pattern '^.*$' to uri '/error/HTTP_NOT_FOUND.html.var' 70.104.12.9 - - [30/Nov/2007:12:15:49 --0800] [www.domain.com/sid#5585b900][rid#55b01ad0/initial/redir#1] (1) pass through /error/HTTP_NOT_FOUND.html.var 70.104.12.9 - - [30/Nov/2007:12:15:49 --0800] [www. domain.com/sid#5585b900][rid#55b7c6a8/subreq] (2) init rewrite engine with requested uri /error/include/top.html 70.104.12.9 - - [30/Nov/2007:12:15:49 --0800] [www. domain.com/sid#5585b900][rid#55b7c6a8/subreq] (3) applying pattern '\.(html|php|css|js|jpg|gif|png|pdf|txt|swf|flv|wmv|wav|htm)$' to uri '/error/include/top.html' 70.104.12.9 - - [30/Nov/2007:12:15:49 --0800] [www. domain.com/sid#5585b900][rid#55b7c6a8/subreq] (4) RewriteCond: input='!' pattern='(.*)' => matched 70.104.12.9 - - [30/Nov/2007:12:15:49 --0800] [www. domain.com/sid#5585b900][rid#55b7c6a8/subreq] (1) pass through /error/include/top.html 70.104.12.9 - - [30/Nov/2007:12:15:49 --0800] [www. domain.com/sid#5585b900][rid#55c8c1f8/subreq] (2) init rewrite engine with requested uri /error/include/bottom.html I see the issue with server_port =81 not being matched, but I have tried removing that directive, as well as changing it to !=81. I don't really have any leads as to what to try next. Thanks for your help, Matt -Original Message- From: Krist van Besien [mailto:[EMAIL PROTECTED] Sent: Friday, November 30, 2007 11:44 AM To: users@httpd.apache.org Subject: Re: [EMAIL PROTECTED] Redirect HTTPS --> HTTP On Nov 30, 2007 7:51 PM, Matt Bullock <[EMAIL PROTECTED]> wrote: > Are there any clues as to why this wont work? Is there anything else I > can check, raise the log level? Raise loglevel. You'll see what gets matched and what not. Krist -- [EMAIL PROTECTED] [EMAIL PROTECTED] 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 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] - 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] PhP Rewrite Map File Problem
Hi - through some great help from this list (I'm looking at you Joshua Slive) I was able to setup a RewriteMap using a PhP program. After a couple months usage on a number of heavy sites we're noticing an odd inconsistent problem that causes ALL site requests to yeild this nasty error: mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary. The program is called rewriter.php and starts with this directive: RewriteLock '/tmp/rewrite.lock' RewriteMap rewriter prg:/usr/local/bin/rewriter.php A site that wants to use this URL mapper has this in their .htaccess: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l RewriteRule .* ${rewriter:%{REQUEST_FILENAME}^%{REQUEST_URI}} [L,QSA,NS] There are some other directives involved to 301 redirect old URL's to the new ones, but I don't think they are the problem. The program source can be seen here: http://batcave.intrcomm.net/rewriter.phps In a nutshell what happens is the program parses stdin (which from the RewriteRule is the REQUEST_FILENAME followed by the REQUEST_URI) - from this information it can find the site's virtual host directory and load a file called _rewrite_map.php which is a simple php associated array containing for each page then URL should it map to. This works fine until someone updates that file through releasing pages on their site (via a CMS). Occasionally, (maybe 5% of the time) when this file is updated the above error occurs on every request. The ONLY way to fix this is to hard stop and start the server (a restart doesn't restart the php RewriteMap program) When the server is restarted, all works well - until the next time updating this file causes this problem. I've added some logging where the URL is returned to the apache process: if (DEBUG) { error_log("Map found for URI: $uri: $uri_under " . $map[$uri] . "\n", 3, '/tmp/rewriter.log'); } fputs($stdout, $map[$uri] . "\n"); // tell RewriteRule the URL Even when these maximum redirect errors are happening, the program is still logging the above using the correct URL - it's not having any problems accessing the map file. I added some additional file locking (also to the program that updates the file) but that didn't help. Someone at work here suggested that it might have to do with how stdin and stdout are defined, which makes sense so I'm trying that next but I wanted to see if any gurus on this list know of any strange RewriteMap bugs/gotchas like this. PhP is 4.4 - apache is 1.3.37 - linux 2.4 Thanks - let me know if additional info is needed. Josh - 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] Redirect HTTPS --> HTTP
Krist, Every option I have tried has had no effect on changing the url back to http from https so far. The latest is this: RewriteCond {SERVER_PORT} !=81 RewriteCond %{REQUEST_URI} ^/scripts/vendor/membership\.php$ RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L] The above will write the http to https fine. Then I try and change back to http: RewriteCond {SERVER_PORT} =81 RewriteCond %{REQUEST_URI} !^/scripts/membership\.php$ RewriteRule ^.*$ http://%{SERVER_NAME}%{REQUEST_URI} [R=301,L] I have tried with and without the SERVER_PORT directive, I have tried using {SERVER_PORT} !=80, and also without server_port./ Results in rewrite log level 2 are this: 70.104.12.9 - - [30/Nov/2007:09:45:00 --0800] [www.domain.com/sid#55818a68][rid#55b5df18/initial] (2) init rewrite engine with requested uri /scripts/vendor/welcome.php 70.104.12.9 - - [30/Nov/2007:09:45:00 --0800] [www. domain.com/sid#55818a68][rid#55b5df18/initial] (1) pass through /scripts/vendor/welcome.php 70.104.12.9 - - [30/Nov/2007:09:45:01 --0800] [www. domain.com/sid#55818a68][rid#5590ec38/initial] (2) init rewrite engine with requested uri /resource/themes/default/css/learn.css.php 70.104.12.9 - - [30/Nov/2007:09:45:01 --0800] [www. domain.com/sid#55818a68][rid#5590ec38/initial] (1) pass through /resource/themes/default/css/learn.css.php 70.104.12.9 - - [30/Nov/2007:09:45:03 --0800] [www. domain.com/sid#55818a68][rid#563a68c8/initial] (2) init rewrite engine with requested uri /scripts/vendor/blank.php 70.104.12.9 - - [30/Nov/2007:09:45:03 --0800] [www. domain.com/sid#55818a68][rid#563a68c8/initial] (1) pass through /scripts/vendor/blank.php 70.104.12.9 - - [30/Nov/2007:09:45:03 --0800] [www. domain.com/sid#55818a68][rid#55b5ee30/initial/redir#1] (2) init rewrite engine with requested uri /error/HTTP_NOT_FOUND.html.var 70.104.12.9 - - [30/Nov/2007:09:45:03 --0800] [www. domain.com/sid#55818a68][rid#55b5ee30/initial/redir#1] (1) pass through /error/HTTP_NOT_FOUND.html.var 70.104.12.9 - - [30/Nov/2007:09:45:03 --0800] [www. domain.com/sid#55818a68][rid#55a2dbd8/subreq] (2) init rewrite engine with requested uri /error/include/top.html 70.104.12.9 - - [30/Nov/2007:09:45:03 --0800] [www. domain.com/sid#55818a68][rid#55a2dbd8/subreq] (1) pass through /error/include/top.html 70.104.12.9 - - [30/Nov/2007:09:45:03 --0800] [www. domain.com/sid#55818a68][rid#55e810e8/subreq] (2) init rewrite engine with requested uri /error/include/bottom.html 70.104.12.9 - - [30/Nov/2007:09:45:03 --0800] [www. domain.com/sid#55818a68][rid#55e810e8/subreq] (1) pass through /error/include/bottom.html 70.104.12.9 - - [30/Nov/2007:09:45:03 --0800] [www. domain.com/sid#55818a68][rid#563b53a8/subreq] (2) init rewrite engine with requested uri /error/contact.html.var 70.104.12.9 - - [30/Nov/2007:09:45:03 --0800] [www. domain.com/sid#55818a68][rid#563b53a8/subreq] (1) pass through /error/contact.html.var 70.104.12.9 - - [30/Nov/2007:09:45:05 --0800] [www. domain.com/sid#55818a68][rid#55a45418/initial] (2) init rewrite engine with requested uri /scripts/vendor/bt.css 70.104.12.9 - - [30/Nov/2007:09:45:05 --0800] [www. domain.com/sid#55818a68][rid#55a45418/initial] (1) pass through /scripts/vendor/bt.css 70.104.12.9 - - [30/Nov/2007:09:45:05 --0800] [www. domain.com/sid#55818a68][rid#5590f9f8/initial/redir#1] (2) init rewrite engine with requested uri /error/HTTP_NOT_FOUND.html.var 70.104.12.9 - - [30/Nov/2007:09:45:05 --0800] [www. domain.com/sid#55818a68][rid#5590f9f8/initial/redir#1] (1) pass through /error/HTTP_NOT_FOUND.html.var 70.104.12.9 - - [30/Nov/2007:09:45:05 --0800] [www. domain.com/sid#55818a68][rid#55a4d458/subreq] (2) init rewrite engine with requested uri /error/include/top.html 70.104.12.9 - - [30/Nov/2007:09:45:05 --0800] [www. domain.com/sid#55818a68][rid#55a4d458/subreq] (1) pass through /error/include/top.html 70.104.12.9 - - [30/Nov/2007:09:45:05 --0800] [www. domain.com/sid#55818a68][rid#55a3bc48/subreq] (2) init rewrite engine with requested uri /error/include/bottom.html 70.104.12.9 - - [30/Nov/2007:09:45:05 --0800] [www. domain.com/sid#55818a68][rid#55a3bc48/subreq] (1) pass through /error/include/bottom.html 70.104.12.9 - - [30/Nov/2007:09:45:05 --0800] [www. domain.com/sid#55818a68][rid#55a51478/subreq] (2) init rewrite engine with requested uri /error/contact.html.var 70.104.12.9 - - [30/Nov/2007:09:45:05 --0800] [www. domain.com/sid#55818a68][rid#55a51478/subreq] (1) pass through /error/contact.html.var Are there any clues as to why this wont work? Is there anything else I can check, raise the log level? Thanks, Matt -Original Message- From: Krist van Besien [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 28, 2007 2:46 PM To: users@httpd.apache.org Subject: Re: [EMAIL PROTECTED] Redirect HTTPS --> HTTP On Nov 28, 2007
RE: [EMAIL PROTECTED] Redirect HTTPS --> HTTP
No, just abbreviating things to specify the virtual host port assignments. Matt -Original Message- From: Krist van Besien [mailto:[EMAIL PROTECTED] Sent: Friday, November 30, 2007 11:42 AM To: users@httpd.apache.org Subject: Re: [EMAIL PROTECTED] Redirect HTTPS --> HTTP On Nov 28, 2007 9:10 PM, Matt Bullock <[EMAIL PROTECTED]> wrote: > > Here are the rules I am using: > > > > > > > > RewriteCond {SERVER_PORT} !=81 > > RewriteCond %{REQUEST_URI} ^/scripts/vendor/new_package\.php$ > > RewriteRule ^.*$ https://www.domain.com%{REQUEST_URI} [R=301,L] > > > > Just one question. Is this literally what you have in your httpd.conf? is not a valid apache directive. Krist -- [EMAIL PROTECTED] [EMAIL PROTECTED] 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 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] - 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] Redirect HTTPS --> HTTP
On Nov 30, 2007 7:51 PM, Matt Bullock <[EMAIL PROTECTED]> wrote: > Are there any clues as to why this wont work? Is there anything else I > can check, raise the log level? Raise loglevel. You'll see what gets matched and what not. Krist -- [EMAIL PROTECTED] [EMAIL PROTECTED] 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 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] Re: Apache 2.2.3 rotatelogs.exe on Windows
I've been trying to figure out how to rotate the error log in a Windows environment. I'm rotating the access logs in the vhost config file as follows: LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common # You need to enable mod_logio.c to use %I and %O LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio CustomLog logs/cob/access-log-%Y-%m-%d.log combined RotateLogs On RotateLogsLocalTime On RotateInterval 86400 And I'm successfully logging errors by configuring the http.conf file as follows: LogLevel info ErrorLog c:/apache2/logs/error.log However, I'm unclear how to rotate the error logs. I tried using this directive but the server wouldn't restart. I couldn't refer to the error log to see what might be wrong with this directive because it applies to the error log: ErrorLog "| c:/apache2/bin/rotatelogs.exe c:/apache2/logs/%Y%m%d_error.log 86400" If someone could point me in the right direction I'd appreciate it. Thanks Steven Kenji Kikuchi <[EMAIL PROTECTED] -g.co.jp> To users@httpd.apache.org 11/30/2007 01:03 cc AM Subject [EMAIL PROTECTED] Apache 2.2.3 Please respond to rotatelogs.exe on WindowsXP [EMAIL PROTECTED] e.org Hi All I have installed apache2.2.3 on Windows XP and am using rotatelogs.exe for ErrorLog directive like httpd.conf --- ErrorLog "| C:/test/logs/rotatelogs.exe C:/test/logs/%Y%m%d_error.log 86400" --- Regards, Kenji Kikuchi - 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] Configure mod_proxy_html
Hello, I have two Tomcat webapps, say 'app1' and 'app2', reacheable locally at the following URLs: http://localhost:8081/app1 (app1) http://localhost:8081/app2 (app2) I would like to publish on Internet app1 and a 'subset' of app2: http://www.mydomain --> http://localhost:8081/app1 http://www.mydomain/sub --> http://localhost:8081/app2/sub So I'm try to configure 'mod_proxy_html' as reported at http://www.apachetutor.org/admin/reverseproxies: LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule headers_modulemodules/mod_headers.so LoadFile /usr/lib/libxml2.so LoadModule proxy_html_module modules/mod_proxy_html.so: ProxyRequests off ProxyPass / http://localhost:8081/app1 ProxyPass /sub/ http://localhost:8081/app2/sub ProxyHTMLURLMap http://localhost:8081/app1 / ProxyHTMLURLMap http://localhost:8081/app2 /app2 ProxyPassReverse / SetOutputFilter proxy-html ProxyHTMLURLMap / /app1/ ProxyHTMLURLMap /app1 /app1 RequestHeaderunset Accept-Encoding ProxyPassReverse / SetOutputFilter proxy-html ProxyHTMLURLMap / /app2/sub/ ProxyHTMLURLMap /app2/sub /app2/sub RequestHeader unset Accept-Encoding But itdoesn't work. I get always the home page of app1 (the same is for app2) with link inside (images, css, link and so on) wrong. ;ore precisely each link is prefixed by: http://www.mydomain/app1 http://www.mydomain/app2/sub And so I don't get a correct navigation. Where is the mistake? rocsca - 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 make a website like ftpsite?
On Nov 30, 2007 11:21 AM, goommy <[EMAIL PROTECTED]> wrote: > Header set Content-Type > application/octet-stream > Header append 123-Type 123 It is probabvly better to use ForceType application/octet-stream Krist -- [EMAIL PROTECTED] [EMAIL PROTECTED] 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 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] Apache 2.2.6, problem with mod_proxy: "ProxyPass|ProxyPassMatch can not have a path when defined in a location."
Werner, This is in a location block for /whatever then you are proxying only stuff that starts /a/... or /b/ neither of which will ever be matched. D On Fri, 2007-11-30 at 10:46 +0100, Werner Schalk wrote: > Hi, > > > I would guess it's because your config actually looks something like: > > > > > > > > ProxyPass /a/ http://localhost:8080/ > > ProxyPass /b/ http://localhost:/ > > ... > > > > > > maybe? > > Yes, but where is the problem with this statement? This worked fine in > Apache 2.2.3, why does it not work anymore with Apache 2.2.6? > > Best regards, > Werner > > - Original Message - > From: "Jim Jagielski" <[EMAIL PROTECTED]> > To: > Sent: Thursday, November 29, 2007 5:15 PM > Subject: Re: [EMAIL PROTECTED] Apache 2.2.6, problem with mod_proxy: > "ProxyPass|ProxyPassMatch can not have a path when defined in a location." > > > > On Thu, Nov 29, 2007 at 05:12:12PM +0100, Werner Schalk wrote: > >> Hi, > >> > >> I am running the latest version of XAMMP provided by Apachefriends.org. > >> The > >> software includes Apache 2.2.6 and I am trying to configure a reverse > >> proxy. The modules are loaded but the following lines makes Apache > >> unhappy > >> and complain about my configuration: > >> > >> ProxyPass /a/ http://localhost:8080/ > >> ProxyPass /b/ http://localhost:/ > >> > >> Now when starting the Apache I do get the following error message for a > >> syntax check (which corresponds exactly to those lines): > >> > >> /opt/lampp/bin/httpd -t -f /opt/lampp/etc/httpd.conf > >> Syntax error on line 236 of /opt/lampp/etc/httpd.conf: > >> ProxyPass|ProxyPassMatch can not have a path when defined in a location. > >> > >> Does anyone know what my mistake here is? I have searched the manual and > >> googled for the problem but I didn't find any answer. Thanks! > >> > > > > I would guess it's because your config actually looks something like: > > > > > > > > ProxyPass /a/ http://localhost:8080/ > > ProxyPass /b/ http://localhost:/ > > ... > > > > > > maybe? > > -- > > === > > Jim Jagielski [|] [EMAIL PROTECTED] [|] http://www.jaguNET.com/ > >"Great is the guilt of an unnecessary war" ~ John Adams > > > > - > > 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] > > > - > 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] > - 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] How to make a website like ftpsite?
users,您好! What my mean is not mod_ftp !! It's just a experiment to study apache ! What i want to do is make a website like ftpsite:after open the URL i can see the file list and i can download all files! First.i use "Options Indexes" and "DirectoryIndex none" list the all file! By default, when i click on the file, some types can brows directly(just like *.html *.txt *.gif *.jpg ...) and some other types will prompt download dialog for choosen(like *.tar.gz *.mp3 and so on). So i want to try when click on *.html it also appear the prompt dialog for choosen! And i found 【If the media type remains unknown, the recipient SHOULD treat it as type "application/octet-stream".】on rfc2616! So i think maybe i can get the result by change the response header!!(qu.1: Is it a right idea?) So i set DocumentRoot /opt/webdata/www2cn ServerName www2.putiantaili.com.cn DirectoryIndex index.none #try to : all files download only ,can't browser with IE Options Indexes FollowSymLinks Header set Content-Type application/octet-stream Header append 123-Type 123 AllowOverride All Order deny,allow allow from all But the result is failure! (very depressed!!) And the reponse header is : HTTP/1.0 200 OK Server: Apache/2.2.4 (Unix) mod_ssl/2.2.4 OpenSSL/0.9.7a ETag: "97b7d-2d-75d78680" Accept-Ranges: bytes Content-Type: text/plain (why not application/octet-stream) 123-Type: 123(123-type header set ) And qu.2 : How to make a website like ftpsite? Thank you for your help!!! (This experiment takes me a long time and halt)
[EMAIL PROTECTED] Apache 2.2.3 rotatelogs.exe on WindowsXP
Hi All I have installed apache2.2.3 on Windows XP and am using rotatelogs.exe for ErrorLog directive like httpd.conf --- ErrorLog "| C:/test/logs/rotatelogs.exe C:/test/logs/%Y%m%d_error.log 86400" --- rotatelogs.exe seems working correct, but I can't delete the log files from command prompt. --- C:\test\logs>ls 20071130_error.log rotatelogs.exe C:\work4\logs>del 20071130_error.log C:\test\logs>ls 20071130_error.log rotatelogs.exe --- I would like to delete old log files by script for maintenance work. To delete old logs by script, I need to kill all rotatelogs.exe process. How can you handle this? Before execute "del" command, I can delete them from Windows Explore. After "del" command, I can't. Why? Regards, Kenji Kikuchi - 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] Redirect HTTPS --> HTTP
On Nov 28, 2007 9:10 PM, Matt Bullock <[EMAIL PROTECTED]> wrote: > > Here are the rules I am using: > > > > > > > > RewriteCond {SERVER_PORT} !=81 > > RewriteCond %{REQUEST_URI} ^/scripts/vendor/new_package\.php$ > > RewriteRule ^.*$ https://www.domain.com%{REQUEST_URI} [R=301,L] > > > > Just one question. Is this literally what you have in your httpd.conf? is not a valid apache directive. Krist -- [EMAIL PROTECTED] [EMAIL PROTECTED] 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 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] httpd 2.0.53 mod_auth and virtual host problem
Hi, I hope someone can help me with this, Someone else set up a site a few years ago and it's only used once a year. It worked in previous years and presumably hasn't changed, but now it's not working. The person who set it up has taken another job and probably wouldn't remember anything anyway. The site is set up so that if people come in from one of the allowed IPs they don't have to log in. Anybody else has to log in with the usual mod_auth stuff. The site structure is set up like this htdocs/main directory |__ site1 |__ site2 |__ site3 |__ main site |__ site5 Users start by trying to access the "main site" URL. If they come in on an IP which is not in an Allow statement they are prompted for a login and get in to "main site". The page comes up just fine. Then they click on a link that takes them to one of the other sites. Their browser just sits there indefinitely, spinning. In the logs for "site2" I see an access_log entry for their IP but "-" instead of the login ID and 401 401 (Not Authorized) in the return codes. The main directory's Directory directive and virtual host definitions are outlined below. Any help appreciated. I've read all the mod_auth and mod_access stuff on the Apache site, wasn't able to figure out how to formulate a search for the archives. Thanks, Sheryl Options -Indexes FollowSymLinks MultiViews AllowOverride AuthConfig AuthType Basic AuthName "Authorized User" AuthUserFile /path/to/htpasswd_file Require valid-user Order Allow,Deny # Allow from IP1 Allow from IP2 (and so forth) # Satisfy any NameVirtualHost IP.number:80 ServerName, ServerAlias, log directives, etc (no authentication info in the virtualhost directives) repeat VirtualHost block for each host. - 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 make a website like ftpsite?
On Nov 30, 2007 11:21 AM, goommy <[EMAIL PROTECTED]> wrote: > users,您好! > > What my mean is not mod_ftp !! > It's just a experiment to study apache ! > What i want to do is make a website like ftpsite:after open the URL i can see > the file list > and i can download all files! > First.i use "Options Indexes" and "DirectoryIndex none" list the all file! > By default, when i click on the file, some types can brows directly(just > like *.html *.txt *.gif *.jpg ...) and some other types will prompt download > dialog for choosen(like *.tar.gz *.mp3 and so on). So i want to try when > click on *.html it also appear the prompt dialog for choosen! > And i found 【If the media type remains unknown, the recipient SHOULD > treat it as type "application/octet-stream".】on rfc2616! So i think maybe i > can get the result by change the response header!!(qu.1: Is it a right idea?) > So i set > DocumentRoot /opt/webdata/www2cn > ServerName www2.putiantaili.com.cn > DirectoryIndex index.none > > #try to : all files download only ,can't > browser with IE > Options Indexes FollowSymLinks > Header set Content-Type > application/octet-stream > Header append 123-Type 123 > AllowOverride All > Order deny,allow > allow from all > > > But the result is failure! (very depressed!!) > And the reponse header is : > HTTP/1.0 200 OK > Server: Apache/2.2.4 (Unix) mod_ssl/2.2.4 OpenSSL/0.9.7a > ETag: "97b7d-2d-75d78680" > Accept-Ranges: bytes > Content-Type: text/plain (why not application/octet-stream) > 123-Type: 123(123-type header set ) > > And qu.2 : How to make a website like ftpsite? Thank you for your help!!! > (This experiment takes me a long time and halt) What browser are you using? Internet explorer has been know to ignore the content type header. Krist -- [EMAIL PROTECTED] [EMAIL PROTECTED] 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?
[EMAIL PROTECTED] Prevent new page
One web page with a form invokes a PHP script which in turn invokes a Javascript popup. No additional output is written to the original page. As, or soon after, the popup appears- the original web page is replaced by a "new", blank web page. How can this "new page" be prevented, while not resetting the original page, so there is the popup and the original page with the user-entered data still in the form fields? - 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 force loging using https,all others using http?
On Nov 30, 2007 2:54 AM, baalchina <[EMAIL PROTECTED]> wrote: > Hello everyone. > > I am using a forum,with php. The logging file is logging.php. > > I set mod_rewrite,to force logging using https, for example,user who clicks > http://myforum/logging.php will automatic direct to > https://myforum/logging.php > > The problem is, not all of my sites need https. but when user successfully > logged in, he will stay in https. > > So, is there any way I can use rewrite to force all of my site files to > using http,except logging.php? A lot depends on how the login mechanism on you site works. What happens after a user es entered his details and submits the form? But ask yourself why you want this? I know of no good reason to want a user to make a https session fall back to http, while there are quite a few reasons to stay with https. Krist -- [EMAIL PROTECTED] [EMAIL PROTECTED] 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 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] Apache 2.2.6, problem with mod_proxy: "ProxyPass|ProxyPassMatch can not have a path when defined in a location."
I'd say they fixed a bug because that condition should never have been matched in the first place. On Fri, 2007-11-30 at 10:46 +0100, Werner Schalk wrote: > Hi, > > > I would guess it's because your config actually looks something like: > > > > > > > > ProxyPass /a/ http://localhost:8080/ > > ProxyPass /b/ http://localhost:/ > > ... > > > > > > maybe? > > Yes, but where is the problem with this statement? This worked fine in > Apache 2.2.3, why does it not work anymore with Apache 2.2.6? > > Best regards, > Werner > > - Original Message - > From: "Jim Jagielski" <[EMAIL PROTECTED]> > To: > Sent: Thursday, November 29, 2007 5:15 PM > Subject: Re: [EMAIL PROTECTED] Apache 2.2.6, problem with mod_proxy: > "ProxyPass|ProxyPassMatch can not have a path when defined in a location." > > > > On Thu, Nov 29, 2007 at 05:12:12PM +0100, Werner Schalk wrote: > >> Hi, > >> > >> I am running the latest version of XAMMP provided by Apachefriends.org. > >> The > >> software includes Apache 2.2.6 and I am trying to configure a reverse > >> proxy. The modules are loaded but the following lines makes Apache > >> unhappy > >> and complain about my configuration: > >> > >> ProxyPass /a/ http://localhost:8080/ > >> ProxyPass /b/ http://localhost:/ > >> > >> Now when starting the Apache I do get the following error message for a > >> syntax check (which corresponds exactly to those lines): > >> > >> /opt/lampp/bin/httpd -t -f /opt/lampp/etc/httpd.conf > >> Syntax error on line 236 of /opt/lampp/etc/httpd.conf: > >> ProxyPass|ProxyPassMatch can not have a path when defined in a location. > >> > >> Does anyone know what my mistake here is? I have searched the manual and > >> googled for the problem but I didn't find any answer. Thanks! > >> > > > > I would guess it's because your config actually looks something like: > > > > > > > > ProxyPass /a/ http://localhost:8080/ > > ProxyPass /b/ http://localhost:/ > > ... > > > > > > maybe? > > -- > > === > > Jim Jagielski [|] [EMAIL PROTECTED] [|] http://www.jaguNET.com/ > >"Great is the guilt of an unnecessary war" ~ John Adams > > > > - > > 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] > > > - > 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] > - 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] Apache 2.2.6, problem with mod_proxy: "ProxyPass|ProxyPassMatch can not have a path when defined in a location."
Hi, I would guess it's because your config actually looks something like: ProxyPass /a/ http://localhost:8080/ ProxyPass /b/ http://localhost:/ ... maybe? Yes, but where is the problem with this statement? This worked fine in Apache 2.2.3, why does it not work anymore with Apache 2.2.6? Best regards, Werner - Original Message - From: "Jim Jagielski" <[EMAIL PROTECTED]> To: Sent: Thursday, November 29, 2007 5:15 PM Subject: Re: [EMAIL PROTECTED] Apache 2.2.6, problem with mod_proxy: "ProxyPass|ProxyPassMatch can not have a path when defined in a location." On Thu, Nov 29, 2007 at 05:12:12PM +0100, Werner Schalk wrote: Hi, I am running the latest version of XAMMP provided by Apachefriends.org. The software includes Apache 2.2.6 and I am trying to configure a reverse proxy. The modules are loaded but the following lines makes Apache unhappy and complain about my configuration: ProxyPass /a/ http://localhost:8080/ ProxyPass /b/ http://localhost:/ Now when starting the Apache I do get the following error message for a syntax check (which corresponds exactly to those lines): /opt/lampp/bin/httpd -t -f /opt/lampp/etc/httpd.conf Syntax error on line 236 of /opt/lampp/etc/httpd.conf: ProxyPass|ProxyPassMatch can not have a path when defined in a location. Does anyone know what my mistake here is? I have searched the manual and googled for the problem but I didn't find any answer. Thanks! I would guess it's because your config actually looks something like: ProxyPass /a/ http://localhost:8080/ ProxyPass /b/ http://localhost:/ ... maybe? -- === Jim Jagielski [|] [EMAIL PROTECTED] [|] http://www.jaguNET.com/ "Great is the guilt of an unnecessary war" ~ John Adams - 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] - 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_info loads on one server but not on the other
running apache 2.0.59-r5 on two almost identical servers (both dual core intel cpus but not same speed) with identical config files on both. The only other difference between the two servers is that I have an extra kernel network driver module built-in on the backup server that works correctly. I've done the same on the production server but have not yet rebooted it so it is running slightly different kernel. On one server mod_status, mod_info and mod_access all load but on the other they don't. I can see this from the phpinfo() list of loaded modules for each. same conf for both: APACHE2_OPTS="-D DEFAULT_VHOST -D SSL_DEFAULT_VHOST -D CGI -D PHP5 -D SSL -D PYTHON -D PERL -D INFO" Background: i'm running gentoo linux on a production server and needed to end the use of php4, so to stop the heart palpitations that come from rebuilding lots of apps at the same time on a live server, I set up a backup server and cloned the production server onto it. On the backup I nixed php4 and updated php5 to the latest, restarted apache and after a few php.ini tweaks all went much better than I expected: few errors. Heartened with the trial result I tried the same on the production server and everything went well except that for some reason server-status and server-info are no longer working, they return a 404 file not found. Everything else seems perfect. Here's most probably where the problem lies: I noticed when I restarted apache on the production server only it gives start-up errors: # /etc/init.d/apache2 restart : command not found: line 2: : command not found: line 25: : command not found: line 31: : command not found: line 34: : command not found: line 39: : command not found: line 43: : command not found: line 50: * Stopping apache2 ... [ ok ] * Starting apache2 ... [ ok ] can't see anything susicious in the error log in fact it's the exact same messages as on the one that works correctly. I looked in /etc/init.d/apache2 and can't for the life of me see what those lines refer to, the line numbers make no sense. I'm guessing that apache is not loading some part of the http.conf file, likely around about where it loads the modules in question. What's strange is that I can copy the entire /etc/apache2 folder from the server where it doesn't work right over to the other overwriting it's apache2 folder, restart apache there and everything works just fine. I don't get it...what's happening here?