[users@httpd] How to check for REMOTE_USER using mod_auth_mysql
Hi, I am having some problems with my apache VirtualHost configuration and hopefully somebody can help me out. System: - Apache/2.2.9 (Debian) - We use mod_auth_mysql for user authentication. - most requests are passed to Zope application framework - requests to /docs/ are mapped to the file system /var/www/sub (as an example) We serve multiple subdomains using a name based virtual hosting configuration. For file uploads I would like to use the PUT request method (using javascript XMLHttpRequest) using mod_dav to write directly to the file system (no high memory usage when uploading gigabytes). This is working OK, no problems there. However I would like to prevent (as a server administrator) anonymous users to be able to upload files this way. Because webmasters of subdomains have access to .htaccess files, and they must be allowed to override any require valid-user rules, just adding Limit PUTrequire valid-user/Limit is not enough. I want to prevent local webmasters from accidentally creating a security issue. My approach to limit the access to the PUT request to authenticated users was to add the following rewrite rules to the VirtualHost: # set response header for debugging purposes RewriteRule . - [E=RU:%{REMOTE_USER}] Header add X_my_userss %{RU}e # check if user is not authenticated and method == PUT, then forbid request RewriteCond %{LA-U:REMOTE_USER} ^$ RewriteCond %{REQUEST_METHOD} =PUT RewriteRule ^/(.*) - [F] But the REMOTE_USER variable seems to be (null) at every request (have checked this by adding a custom header with this value to the response), although HTTP Basic Authentication headers are provided by the browser, and the user is granted access to restricted resources. Also for anonymous access this variable is (null). I have tried this code inside the VirtualHost directive directly, but also inside the Directory context inside this VirtualHost. Both to no avail. Also have tried using %{REMOTE_USER} instead of %{LA-U:REMOTE_USER}. I think that maybe this problem is caused by the usage of mod_auth_mysql? Does that not allow for look-ahead REMOTE_USER checks? A somewhat simplified version of the VirtualHost can be found below. === VirtualHost *:443 ServerName sub.example.com ServerAlias www.sub.example.com DocumentRoot /var/www/sub Directory /var/www/sub/ Options -Indexes +FollowSymLinks +MultiViews DirectorySlash On AllowOverride All Order allow,deny Allow from all AuthName Zope AuthType Basic AuthUserFile /dev/null AuthBasicAuthoritative Off Require valid-user AuthMYSQL on AuthMySQL_Authoritative on AuthMySQL_Empty_Passwords off AuthMySQL_DB ** AuthMySQL_Password_Table ** AuthMySQL_Username_Field ** AuthMySQL_Password_Field ** AuthMySQL_Group_Table ** AuthMySQL_Group_Field ** AuthMySQL_Encryption_Types ** /Directory SSLEngine on RewriteEngine on # download files from apache in the 'docs' directory RewriteRule ^/docs/(.*) /var/www/sub/$1 [L] # pass requests to Zope RewriteRule ^/(.*) http://localhost:%{ZOPE_PORT}/VirtualHostBase/https/sub.example.com:443/sub/VirtualHostRoot/$1 [L,P] /VirtualHost - 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] only one worker process
Hello, I'm developing a php module and I'd like to test if the module doesn't consume memory and doesn't make a seg fault. I'd like to make a multithreaded test and start only one worker process. Can anybody help me with the proper configuration? I have SLES11, 32bit. The server-tuning.conf I set to: IfModule prefork.c StartServers 1 MinSpareServers 1 MaxSpareServers 1 ServerLimit2 MaxClients 150 MaxRequestsPerChild 1 /IfModule IfModule worker.c StartServers 1 MinSpareThreads 25 MaxSpareThreads 75 ThreadLimit 64 MaxClients 150 ThreadsPerChild 25 MaxRequestsPerChild 1 /IfModule KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 15 IfModule mod_setenvif.c BrowserMatch Mozilla/2 nokeepalive BrowserMatch MSIE 4\.0b2; nokeepalive downgrade-1.0 force-response-1.0 BrowserMatch RealPlayer 4\.0 force-response-1.0 BrowserMatch Java/1\.0 force-response-1.0 BrowserMatch JDK/1\.0 force-response-1.0 BrowserMatch Microsoft Data Access Internet Publishing Provider redirect-carefully BrowserMatch ^WebDrive redirect-carefully BrowserMatch ^WebDAVFS/1.[012] redirect-carefully BrowserMatch ^gnome-vfs redirect-carefully /IfModule The apache compilation options are: ca:/etc/apache2 # /usr/sbin/httpd2 -V Server version: Apache/2.2.10 (Linux/SUSE) Server built: Apr 13 2010 16:44:06 Server's Module Magic Number: 20051115:20 Server loaded: APR 1.3.3, APR-Util 1.3.4 Compiled using: APR 1.3.3, APR-Util 1.3.4 Architecture: 32-bit Server MPM: Prefork threaded: no forked: yes (variable process count) Server compiled with -D APACHE_MPM_DIR=server/mpm/prefork -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=128 -D HTTPD_ROOT=/srv/www -D SUEXEC_BIN=/usr/sbin/suexec2 -D DEFAULT_PIDLOG=/var/run/httpd2.pid -D DEFAULT_SCOREBOARD=logs/apache_runtime_status -D DEFAULT_LOCKFILE=/var/run/accept.lock -D DEFAULT_ERRORLOG=/var/log/apache2/error_log -D AP_TYPES_CONFIG_FILE=/etc/apache2/mime.types -D SERVER_CONFIG_FILE=/etc/apache2/httpd.conf - 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] only one worker process
I'd like to make a multithreaded test and start only one worker process. Can anybody help me with the proper configuration? The MPM for above model should be worker MPM. Refer to this link http://httpd.apache.org/docs/2.0/mod/worker.html IfModule worker.c StartServers 1 MinSpareThreads 25 MaxSpareThreads 75 ThreadLimit 64 MaxClients 150 ThreadsPerChild 25 MaxRequestsPerChild 1 /IfModule Add ServerLimit inside the above block and keep its value 1. The apache compilation options are: Server MPM: Prefork threaded: no forked: yes (variable process count) Server compiled with -D APACHE_MPM_DIR=server/mpm/prefork Seems the apache is configured with prefork. That means multiple processes and not threads as you can see from above. You might need to reconfigure and compile with following option --with-mpm=worker Good luck -Pras
Re: [users@httpd] How to check for REMOTE_USER using mod_auth_mysql
On 09/06/2011 07:32 AM, Bart Jansen wrote: Hi, I am having some problems with my apache VirtualHost configuration and hopefully somebody can help me out. System: - Apache/2.2.9 (Debian) - We use mod_auth_mysql for user authentication. - most requests are passed to Zope application framework - requests to /docs/ are mapped to the file system /var/www/sub (as an example) We serve multiple subdomains using a name based virtual hosting configuration. For file uploads I would like to use the PUT request method (using javascript XMLHttpRequest) using mod_dav to write directly to the file system (no high memory usage when uploading gigabytes). This is working OK, no problems there. However I would like to prevent (as a server administrator) anonymous users to be able to upload files this way. Because webmasters of subdomains have access to .htaccess files, and they must be allowed to override any require valid-user rules, just adding Limit PUTrequire valid-user/Limit is not enough. I want to prevent local webmasters from accidentally creating a security issue. My approach to limit the access to the PUT request to authenticated users was to add the following rewrite rules to the VirtualHost: # set response header for debugging purposes RewriteRule . - [E=RU:%{REMOTE_USER}] Header add X_my_userss %{RU}e # check if user is not authenticated and method == PUT, then forbid request RewriteCond %{LA-U:REMOTE_USER} ^$ RewriteCond %{REQUEST_METHOD} =PUT RewriteRule ^/(.*) - [F] But the REMOTE_USER variable seems to be (null) at every request (have checked this by adding a custom header with this value to the response), although HTTP Basic Authentication headers are provided by the browser, and the user is granted access to restricted resources. Also for anonymous access this variable is (null). I have tried this code inside the VirtualHost directive directly, but also inside the Directory context inside this VirtualHost. Both to no avail. Also have tried using %{REMOTE_USER} instead of %{LA-U:REMOTE_USER}. I think that maybe this problem is caused by the usage of mod_auth_mysql? Does that not allow for look-ahead REMOTE_USER checks? A somewhat simplified version of the VirtualHost can be found below. === VirtualHost *:443 ServerName sub.example.com ServerAlias www.sub.example.com DocumentRoot /var/www/sub Directory /var/www/sub/ Options -Indexes +FollowSymLinks +MultiViews DirectorySlash On AllowOverride All Order allow,deny Allow from all AuthName Zope AuthType Basic AuthUserFile /dev/null AuthBasicAuthoritative Off Require valid-user AuthMYSQL on AuthMySQL_Authoritative on AuthMySQL_Empty_Passwords off AuthMySQL_DB ** AuthMySQL_Password_Table ** AuthMySQL_Username_Field ** AuthMySQL_Password_Field ** AuthMySQL_Group_Table ** AuthMySQL_Group_Field ** AuthMySQL_Encryption_Types ** /Directory SSLEngine on RewriteEngine on # download files from apache in the 'docs' directory RewriteRule ^/docs/(.*) /var/www/sub/$1 [L] # pass requests to Zope RewriteRule ^/(.*) http://localhost:%{ZOPE_PORT}/VirtualHostBase/https/sub.example.com:443/sub/VirtualHostRoot/$1 [L,P] /VirtualHost - 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 You should use mod_authn_dbd instead: http://httpd.apache.org/docs/current/mod/mod_authn_dbd.html mod_auth_mysql has been dead for quite some time. Frank - 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] httpd-vhosts.conf using include
Hello, I am working on rebuilding a web server after a crash. In my previous httpd.conf file, include was used to point to virtual host .conf files. In this httpd.conf file it points to httpd-vhosts.conf for virtual hosting. My question is should I include my vitual hosts in the httpd-vhosts.conf or can I use still include in the httpd-vhosts.conf file to point to individual .conf files for my virtual hosts? I have googled for the answer but each examples includes the virtual host in httpd-vhosts.conf. Thank you for your help. Norman --- www: http://www.normanfournier.com facebook: http://www.facebook.com/normanfournierdotcom linkedin: http://www.linkedin.com/profile/view?id=18127460 youtube: http://www.youtube.com/user/normanfournier - 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] chroot and php5 on Ubuntu 11.04 wired error
Hi, I've tried searching the archives (the FAQ is 404 at the moment), but couldn't find any tread regarding my issue. I have an Ubuntu 11.04 server running 2.6.38-10-server I've a stock apache2 and php5 installed from apt. Nothing fancy, no extensions or patches. I've chrooted the apache to a directory, and moved a few sites to the server. The sites loads fine for the first few times, but after a few reloads, I get a strange PHP error. From the logs: [Tue Sep 06 00:41:57 2011] [error] [client 80.98.32.172] PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0 [Tue Sep 06 00:41:57 2011] [error] [client 80.98.32.172] PHP Fatal error: Unknown: Failed opening required '/hosting/site1/index.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0 Few minutes later, or after a restart, the sites are working OK again. If I disable the chroot, everything works fine. Does anybody have a clue, what did I do wrong, or how can I figure out the problem? My only idea, is that I don't have a required so file in the chroot path, when apache runs out of concurrent instances, but I have no idea, how to figure out, what's missing. root@c1:/etc# dpkg -l | grep apache ii apache2 2.2.17-1ubuntu1.2 Apache HTTP Server metapackage ii apache2-mpm-prefork 2.2.17-1ubuntu1.2 Apache HTTP Server - traditional non-threaded model ii apache2-utils 2.2.17-1ubuntu1.2 utility programs for webservers ii apache2.2-bin 2.2.17-1ubuntu1.2 Apache HTTP Server common binary files ii apache2.2-common 2.2.17-1ubuntu1.2 Apache HTTP Server common files ii libapache2-mod-php5 5.3.5-1ubuntu7.2 server-side, HTML-embedded scripting language (Apache 2 module) root@c1:/etc# dpkg -l | grep php ii libapache2-mod-php5 5.3.5-1ubuntu7.2 server-side, HTML-embedded scripting language (Apache 2 module) ii php5 5.3.5-1ubuntu7.2 server-side, HTML-embedded scripting language (metapackage) ii php5-cgi 5.3.5-1ubuntu7.2 server-side, HTML-embedded scripting language (CGI binary) ii php5-cli 5.3.5-1ubuntu7.2 command-line interpreter for the php5 scripting language ii php5-common 5.3.5-1ubuntu7.2 Common files for packages built from the php5 source ii php5-gd 5.3.5-1ubuntu7.2 GD module for php5 ii php5-mcrypt 5.3.5-0ubuntu1 MCrypt module for php5 ii php5-mysql 5.3.5-1ubuntu7.2 MySQL module for php5 ii php5-pgsql 5.3.5-1ubuntu7.2 PostgreSQL module for php5 ii phpmyadmin 4:3.3.10-1 MySQL web administration tool ii phppgadmin 4.2.3-1.1 web-based administration tool for PostgreSQL Thank you for your help, Best regards, Peter Balogh - 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 with non-local virtualhosts
I'm trying to setup a reverse proxy that would route HTTP requests to the appropriate machines on different IPnbsp;addresses Unfortunately, but all the mod_proxy config information I've seen refers to local paths on the machine running the proxy. All the sites would have a DNS that points to the same external IP, which the Reverse Proxy box listens on. I'd like the reverse proxy to then use Host Headers to forward the request to the correct internal IP for that virtualhost. What I'm looking for is something like this: Ext. IPnbsp; 123.123.123.123 - Apache | Reverse | Proxy | | Machine 1 | - 10.1.1.1 - VirtualHost1.example.org | - VirtualHost2.example.org | - VirtualHost3.example.org | | Machine 2 | - 10.1.1.2 - VirtualHost4.example.org - VirtualHost5.example.org - VirtualHost6.example.org Any pointers or a sample config would be greatly appreciated. Thanks! Terry - 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] httpd-vhosts.conf using include
You can arrange them any way that you like. The include statement includes the referenced file(s) at the point where it is encountered. You could expand all of this out, and create a single httpd.conf file, and it would work exactly the same. Or you could have an include statement for every line in your config, with each included file containing just one line. The include mechanism makes it easier to manage, is all. Things I use include for: 1. You can remove stuff fron your config by commenting out the include. So if you add a new Vhost, and define it in a new Include file, then you can remove it with a very simple comment character if it causes problems. 2. It allows you to replace identical sequences of statements in two or more places, for example, you might apply some common ScriptAlias statements across multiple Vhosts (for example, Scriptalias /test /var/www/cgi-bin/text.cgi might be useful in all of your Vhosts. If you add it using Include, then a single change to the include file will update all of your virtualhosts. On 6 September 2011 19:55, Norman Fournier nor...@normanfournier.comwrote: Hello, I am working on rebuilding a web server after a crash. In my previous httpd.conf file, include was used to point to virtual host .conf files. In this httpd.conf file it points to httpd-vhosts.conf for virtual hosting. My question is should I include my vitual hosts in the httpd-vhosts.conf or can I use still include in the httpd-vhosts.conf file to point to individual .conf files for my virtual hosts? I have googled for the answer but each examples includes the virtual host in httpd-vhosts.conf. Thank you for your help. Norman --- www: http://www.normanfournier.com facebook: http://www.facebook.com/normanfournierdotcom linkedin: http://www.linkedin.com/profile/view?id=18127460 youtube: http://www.youtube.com/user/normanfournier - 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 -- Steve Swift http://www.swiftys.org.uk
Re: [users@httpd] How to check for REMOTE_USER using mod_auth_mysql
Frank, thanks for your help. I will look into mod_authn_dbd. Regards, Bart PS. my first mail was a bit blunt (my name wasn't even there), but the mail got accidentally send before it was finished but I did not want to spam the list again. On 06-09-11 16:12, Frank Gingras wrote: On 09/06/2011 07:32 AM, Bart Jansen wrote: Hi, I am having some problems with my apache VirtualHost configuration and hopefully somebody can help me out. System: - Apache/2.2.9 (Debian) - We use mod_auth_mysql for user authentication. - most requests are passed to Zope application framework - requests to /docs/ are mapped to the file system /var/www/sub (as an example) We serve multiple subdomains using a name based virtual hosting configuration. For file uploads I would like to use the PUT request method (using javascript XMLHttpRequest) using mod_dav to write directly to the file system (no high memory usage when uploading gigabytes). This is working OK, no problems there. However I would like to prevent (as a server administrator) anonymous users to be able to upload files this way. Because webmasters of subdomains have access to .htaccess files, and they must be allowed to override any require valid-user rules, just adding Limit PUTrequire valid-user/Limit is not enough. I want to prevent local webmasters from accidentally creating a security issue. My approach to limit the access to the PUT request to authenticated users was to add the following rewrite rules to the VirtualHost: # set response header for debugging purposes RewriteRule . - [E=RU:%{REMOTE_USER}] Header add X_my_userss %{RU}e # check if user is not authenticated and method == PUT, then forbid request RewriteCond %{LA-U:REMOTE_USER} ^$ RewriteCond %{REQUEST_METHOD} =PUT RewriteRule ^/(.*) - [F] But the REMOTE_USER variable seems to be (null) at every request (have checked this by adding a custom header with this value to the response), although HTTP Basic Authentication headers are provided by the browser, and the user is granted access to restricted resources. Also for anonymous access this variable is (null). I have tried this code inside the VirtualHost directive directly, but also inside the Directory context inside this VirtualHost. Both to no avail. Also have tried using %{REMOTE_USER} instead of %{LA-U:REMOTE_USER}. I think that maybe this problem is caused by the usage of mod_auth_mysql? Does that not allow for look-ahead REMOTE_USER checks? A somewhat simplified version of the VirtualHost can be found below. === VirtualHost *:443 ServerName sub.example.com ServerAlias www.sub.example.com DocumentRoot /var/www/sub Directory /var/www/sub/ Options -Indexes +FollowSymLinks +MultiViews DirectorySlash On AllowOverride All Order allow,deny Allow from all AuthName Zope AuthType Basic AuthUserFile /dev/null AuthBasicAuthoritative Off Require valid-user AuthMYSQL on AuthMySQL_Authoritative on AuthMySQL_Empty_Passwords off AuthMySQL_DB ** AuthMySQL_Password_Table ** AuthMySQL_Username_Field ** AuthMySQL_Password_Field ** AuthMySQL_Group_Table ** AuthMySQL_Group_Field ** AuthMySQL_Encryption_Types ** /Directory SSLEngine on RewriteEngine on # download files from apache in the 'docs' directory RewriteRule ^/docs/(.*) /var/www/sub/$1 [L] # pass requests to Zope RewriteRule ^/(.*) http://localhost:%{ZOPE_PORT}/VirtualHostBase/https/sub.example.com:443/sub/VirtualHostRoot/$1 [L,P] /VirtualHost - 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 You should use mod_authn_dbd instead: http://httpd.apache.org/docs/current/mod/mod_authn_dbd.html mod_auth_mysql has been dead for quite some time. Frank - 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] httpd-vhosts.conf using include
On 2011-09-06, at 1:30 PM, Steve Swift wrote: You can arrange them any way that you like. The include statement includes the referenced file(s) at the point where it is encountered. You could expand all of this out, and create a single httpd.conf file, and it would work exactly the same. Or you could have an include statement for every line in your config, with each included file containing just one line. The include mechanism makes it easier to manage, is all. Things I use include for: 1. You can remove stuff fron your config by commenting out the include. So if you add a new Vhost, and define it in a new Include file, then you can remove it with a very simple comment character if it causes problems. 2. It allows you to replace identical sequences of statements in two or more places, for example, you might apply some common ScriptAlias statements across multiple Vhosts (for example, Scriptalias /test /var/www/cgi-bin/text.cgi might be useful in all of your Vhosts. If you add it using Include, then a single change to the include file will update all of your virtualhosts. On 6 September 2011 19:55, Norman Fournier nor...@normanfournier.com wrote: Hello, I am working on rebuilding a web server after a crash. In my previous httpd.conf file, include was used to point to virtual host .conf files. In this httpd.conf file it points to httpd-vhosts.conf for virtual hosting. My question is should I include my vitual hosts in the httpd-vhosts.conf or can I use still include in the httpd-vhosts.conf file to point to individual .conf files for my virtual hosts? I have googled for the answer but each examples includes the virtual host in httpd-vhosts.conf. Thank you for your help. Norman --- -- Steve Swift http://www.swiftys.org.uk Thanks for the information Steve! --- www: http://www.normanfournier.com facebook: http://www.facebook.com/normanfournierdotcom linkedin: http://www.linkedin.com/profile/view?id=18127460 youtube: http://www.youtube.com/user/normanfournier
[users@httpd] force chunked response - Apache 2.2.20
Hello. I'm currently working on a project to migrate some websites from Apache 1.3.33 to Apache 2.2.20. For the most part the migration is going smoothly. However we have 1 application which is failing when running transactions against the updated Apache 2.2.20 instance. This particular application is expecting the http response to be chunked (Transfer-Encoding).The application is an embedded http client used in manufacturing devices and cannot be modified:( According to someone who has viewed the source on my behalf they say it's coded to look in the response for CR LF CR LF followed by the length in hex. In the packet capture between the client and apache 1.3.33 instance I do in fact see the following. Transfer-Encoding: chunked\r\n Content-Type: text/plain\r\n \r\n When the application hit's the Apache 2.2.20 instance the request is sent back with the Content-Length header. While i'm sure the http client is not behaving properly I would like to solicit some ideas on what I can change on the server to force the response to be set to Transfer-Encoding: chunked. I saw some suggestions about unsetting the content-length header in Apache but that didn't force a chunked response (nor did it unset the content-length header). In the virtualhost section i added Header unset Content-Length But the responses still contain that header. I then tried modifying the php file used to generate the response and added header(Transfer-encoding: chunked); flush(); But using curl I get the following parse error * Received problem 2 in the chunky parser Which makes me think the response didn't actually get chunked. Any ideas on how I can support this certainly misbehaving http client is appreciated.My Plan B is to leave the 1.3.33 Apache instance in place but that doesn't feel right. TIA. Deet. - 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] chroot and php5 on Ubuntu 11.04 wired error
On 06/09/2011 3:17 PM, Balogh Péter wrote: Hi, I've tried searching the archives (the FAQ is 404 at the moment), but couldn't find any tread regarding my issue. I have an Ubuntu 11.04 server running 2.6.38-10-server I've a stock apache2 and php5 installed from apt. Nothing fancy, no extensions or patches. I've chrooted the apache to a directory, and moved a few sites to the server. The sites loads fine for the first few times, but after a few reloads, I get a strange PHP error. From the logs: [Tue Sep 06 00:41:57 2011] [error] [client 80.98.32.172] PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0 [Tue Sep 06 00:41:57 2011] [error] [client 80.98.32.172] PHP Fatal error: Unknown: Failed opening required '/hosting/site1/index.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0 Few minutes later, or after a restart, the sites are working OK again. If I disable the chroot, everything works fine. Does anybody have a clue, what did I do wrong, or how can I figure out the problem? My only idea, is that I don't have a required so file in the chroot path, when apache runs out of concurrent instances, but I have no idea, how to figure out, what's missing. root@c1:/etc# dpkg -l | grep apache ii apache2 2.2.17-1ubuntu1.2 Apache HTTP Server metapackage ii apache2-mpm-prefork 2.2.17-1ubuntu1.2 Apache HTTP Server - traditional non-threaded model ii apache2-utils2.2.17-1ubuntu1.2 utility programs for webservers ii apache2.2-bin2.2.17-1ubuntu1.2 Apache HTTP Server common binary files ii apache2.2-common 2.2.17-1ubuntu1.2 Apache HTTP Server common files ii libapache2-mod-php5 5.3.5-1ubuntu7.2 server-side, HTML-embedded scripting language (Apache 2 module) root@c1:/etc# dpkg -l | grep php ii libapache2-mod-php5 5.3.5-1ubuntu7.2 server-side, HTML-embedded scripting language (Apache 2 module) ii php5 5.3.5-1ubuntu7.2 server-side, HTML-embedded scripting language (metapackage) ii php5-cgi 5.3.5-1ubuntu7.2 server-side, HTML-embedded scripting language (CGI binary) ii php5-cli 5.3.5-1ubuntu7.2 command-line interpreter for the php5 scripting language ii php5-common 5.3.5-1ubuntu7.2 Common files for packages built from the php5 source ii php5-gd 5.3.5-1ubuntu7.2 GD module for php5 ii php5-mcrypt 5.3.5-0ubuntu1 MCrypt module for php5 ii php5-mysql 5.3.5-1ubuntu7.2 MySQL module for php5 ii php5-pgsql 5.3.5-1ubuntu7.2 PostgreSQL module for php5 ii phpmyadmin 4:3.3.10-1 MySQL web administration tool ii phppgadmin 4.2.3-1.1 web-based administration tool for PostgreSQL Thank you for your help, Best regards, Peter Balogh - 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 Try asking a php-oriented mailing list. Frank - 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