Bill Hernandez | 1 Jul 2007 03:39
Favicon

Re: I simply cannot start apache 2.0.48

On Jun 30, 2007, at 10:55 AM, x x wrote:

> I run
>
> # apache2ctl start

Ian,

DON'T !

USE THE FULL PATH, PLEASE READ BELOW ...

This took quite a while to write, that's why I didn't get back to you  
earlier...

# Assuming that you are trying to do virtual hosting, or at least  
have, or
# at least one real domain.

#TRY :

# ( 1 ) $ sudo /opt/local/apache2/bin/httpd -S

# If that does not work try :

# ( 2 ) $ sudo /opt/local/apache2/bin/httpd configtest

# +---------+---------+---------+---------+---------+--------- 
+---------+---------+
# ( 3 ) Your httpd.conf should have something like this:
(Continue reading)

Nanu Kalmanovitz | 1 Jul 2007 06:44
Picon
Favicon

Re: Re: Customized 403-404 error pages

Sorry, I'm not the expert ... I hope that others can help.
 
Nanu.

>>> 0.fractalus <at> gmail.com 30/06/2007 21:34:13 >>>
can you make apache use different errordocs w/o changing any config
files? im using a free webhost that dosnt allow for special config
files...

On 6/30/07, Nanu Kalmanovitz <nanu <at> kalmanovitz.co.il> wrote:
> I did the necessary changes ;-)
>
> Thanks!
>
> Nanu
>
> Nanu Kalmanovitz
> Technologies
> Tel.: 972-3-5523542   Celular: 050-5843879
> Kalmanovitz Bros. computerization promotion Ltd.
> P.O.Box 3434 Holon 58133 Israel
> www.kalmanovitz.co.il
>
> >>> gmane <at> jonz.net 30/06/2007 19:09:45 >>>
>
> On Sat, 30 Jun 2007 07:51:29 -0400, Joshua Slive wrote:
> > On 6/30/07, Nanu Kalmanovitz <nanu <at> kalmanovitz.co.il> wrote:
> >>
> >> # ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
> >> ErrorDocument 403 \
> >>> http://www.kalmanovitz.co.il/k_comm/Templates/Error_Pages/403_Access_forbidden.HTM
> >>
> >> # ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
> >> ErrorDocument 404 \
> >>
> http://www.kalmanovitz.co.il/k_comm/templates/Error_Pages/404-NOT_FOUND.htm
> >>
> >> How can I set it to display my error pages and log the error codes
> too?
> >
> > Look at the docs for the Errordocument directive, and in particular
> > the big box about the consequences of using an absolute URL. You can
> > probably fix your problem simply by deleting everying up to co.il in
> > the ErrorDocu ment target.                     ^^^^^^^^^^^^^^
>
> ITYM: everything up _through_.
>
> Jonesy
>
>
> ---------------------------------------------------------------------
> 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-unsubscribe <at> httpd.apache.org
>    "   from the digest: users-digest-unsubscribe <at> httpd.apache.org
> For additional commands, e-mail: users-help <at> httpd.apache.org
>
>
>


--
Morgan gangwere

"Space does not reflect society, it expresses it." -- Castells, M.,
Space of Flows, Space of Places: Materials for a Theory of Urbanism in
the Information Age, in The Cybercities Reader, S. Graham, Editor.
2004, Routledge: London. p. 82-93.-----BEGIN PGP SIGNATURE-----
Version: Gmail/GnuPG Min32 Hack
Comment: Using GnuPG and Gmail - ask me about Grim Fandango

iD8DBQFGV3KQCF9T/dUsmAgRAvESAKDfZYbRtebNO+WPfx6DryIvIwt9TgCgukZG
cIj5nSWws/pAeW2ESlj7GuM=
=Y4uC
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
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-unsubscribe <at> httpd.apache.org
   "   from the digest: users-digest-unsubscribe <at> httpd.apache.org
For additional commands, e-mail: users-help <at> httpd.apache.org

lists | 1 Jul 2007 10:18

Re: Re: Customized 403-404 error pages

Morgan Gangwere wrote:
> can you make apache use different errordocs w/o changing any config
> files? im using a free webhost that dosnt allow for special config
> files...

most free webhosts will allow an .htaccess file, which can be used to
configure apache to use custom error pages.
Their "file manager" won't show the .htaccess [ the '.' is part of the
file name and tells *nix systems it's a hidden file ] file though, and
may not allow for you to overwrite it, but it should allow the overwrite.

---------------------------------------------------------------------
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-unsubscribe <at> httpd.apache.org
   "   from the digest: users-digest-unsubscribe <at> httpd.apache.org
For additional commands, e-mail: users-help <at> httpd.apache.org

Norman Khine | 1 Jul 2007 11:34
Gravatar

Stopping a form processing if size of file is too big with Apache.

Hello,
I have a POST form into which I allow the user to upload an image file
png, flash, gif, jpg.

Is there anything I can do with Apache involving artificially
stopping the upload after receiving enough bytes to constitute the
image header, and then deciding whether or not to proceed with the
upload at that point and if the file does meet the size parameters then
continue with the upload, if not then just return an error, advising the
user that the file is too big.

I don't want to use client-side application as this I think is not the
right way to do it, plus the fact that it may infringe on the privacy
i.e. my script reading the size file on the client computer. Maybe I am
wrong?

Any one with advise on how others approach this issue?

Cheers

Norman

--

-- 
Norman Khine

---------------------------------------------------------------------
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-unsubscribe <at> httpd.apache.org
   "   from the digest: users-digest-unsubscribe <at> httpd.apache.org
For additional commands, e-mail: users-help <at> httpd.apache.org

Tom Donovan | 1 Jul 2007 16:59

Re: Stopping a form processing if size of file is too big with Apache.

Norman Khine wrote:
> Hello,
> I have a POST form into which I allow the user to upload an image file
> png, flash, gif, jpg.
> 
> Is there anything I can do with Apache involving artificially
> stopping the upload after receiving enough bytes to constitute the
> image header, and then deciding whether or not to proceed with the
> upload at that point and if the file does meet the size parameters then
> continue with the upload, if not then just return an error, advising the
> user that the file is too big.
> 
> I don't want to use client-side application as this I think is not the
> right way to do it, plus the fact that it may infringe on the privacy
> i.e. my script reading the size file on the client computer. Maybe I am
> wrong?
> 
> Any one with advise on how others approach this issue?
> 
The LimitRequestBody directive 
http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestbody
might do what you need.

It will stop an oversize upload after reading HTTP headers if the client 
includes a Content-Length header with the request.

Even without a Content-Length header it will still stop the request once 
the limit is reached, so users cannot upload oversize files.

For uploads which are too large, Apache returns a 413 
HTTP_REQUEST_ENTITY_TOO_LARGE response:

"The requested resource {URI} does not allow request data with {METHOD} 
requests, or the amount of data provided in the request exceeds the 
capacity limit."

-tom-

---------------------------------------------------------------------
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-unsubscribe <at> httpd.apache.org
   "   from the digest: users-digest-unsubscribe <at> httpd.apache.org
For additional commands, e-mail: users-help <at> httpd.apache.org

Julius Thyssen | 1 Jul 2007 20:17
Picon

performance and mod_deflate optimization

Hi,

I'm trying to optimize speed by using mod_deflate
on a particular personal server. It runs Apache
httpd 2.052+ and PHP Version 5.1.6, with eaccellerator,
on Linux 2.6.9-023stab033.6 SMP kernel for CentOS 4.5.

Roughly, it serves 5 websites, combined they get
about 1 real human visit each second in total
(excluding redirected hits, blocked spammers/IPs/robots/spiders).
One of the sites is behind SSL, for squirrelmail webmail.
Most filetypes it serves are php (flatfile non-mysql weblogs),
a few text and .htm* files, a very small cgi-script here and there
(and a couple of imagefiles, avi's and mp3's, but not very much).
Bandwidth/traffic are no problem factors for this server, it runs
with a 100 mbit NIC to the net, and I can use it wide-open.
Currently it uses about 210 MB of DDR3, and I have at least
another 128 MB of RAM left, and CPU also has room to do more.

From the current httpd.conf :

# added gzip for mod_deflate:
#<Location />
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI
\.(?:gif|jpe?g|png|wav|mp3|ogg|bmp|avi|mpg)$ no-gzip dont-vary
Header append Vary User-Agent env=!dont-vary
DeflateCompressionLevel 5
DeflateMemLevel 9
DeflateWindowSize 14
#</Location>
#AddOutputFilterByType DEFLATE text/html text/plain text/xml

(When I uncomment the Location tags, Apache won't start.
Haven't figured out why, but doesn't seem to matter,
since I'm running it for all the sites anyway.)

This httpd.conf has had a pretty long life, so I forgot
much of what I've changed over the years. But I was
wondering how I could better load speeds for php webpages
using mod_deflate, and also, handy pointers on how to best
measure this perhaps, although I don't have very much
time to spend on that. I just wonder if any of you
sees really strange or bad general config values.

For that I'm posting some other more or less
crucial values from the same conf:

Timeout 120
KeepAlive On
MaxKeepAliveRequests 60
KeepAliveTimeout 22
# SendBufferSize 16384

<IfModule prefork.c>
StartServers       8
MinSpareServers    4
MaxSpareServers   16
ServerLimit      256
MaxClients       256
MaxRequestsPerChild  800
</IfModule>

<IfModule worker.c>
StartServers         4
MaxClients         128
MinSpareThreads     16
MaxSpareThreads     70
ThreadsPerChild     24
MaxRequestsPerChild  800
</IfModule>

LoadModule access_module modules/mod_access.so
LoadModule auth_module modules/mod_auth.so
LoadModule auth_anon_module modules/mod_auth_anon.so
LoadModule auth_dbm_module modules/mod_auth_dbm.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule ldap_module modules/mod_ldap.so
#LoadModule auth_ldap_module modules/mod_auth_ldap.so
#LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule mime_magic_module modules/mod_mime_magic.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
#LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
#LoadModule dav_module modules/mod_dav.so
#LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule asis_module modules/mod_asis.so
#LoadModule info_module modules/mod_info.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule imap_module modules/mod_imap.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
CheckSpelling on
#LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule cgi_module modules/mod_cgi.so
# added april 2007:
LoadFile /usr/lib/libxml2.so
LoadModule unique_id_module modules/mod_unique_id.so
LoadModule security2_module modules/mod_security2.so
#LoadModule evasive20_module modules/mod_evasive20.so

Those last ones I'm still experimenting with.
For now I use mod_security with only very basic defaults.
This server doesn't really suffer from DDoS attacks often.

Any advice or improvements highly appreciated.

Regards,

Julius

---------------------------------------------------------------------
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-unsubscribe <at> httpd.apache.org
   "   from the digest: users-digest-unsubscribe <at> httpd.apache.org
For additional commands, e-mail: users-help <at> httpd.apache.org

Steve Finkelstein | 1 Jul 2007 21:37

Re: Application using Apache and URL schema inquiry

Thanks for the response. The users don't have any accounts on the 
application web server(s). Their username is just how I currently 
identify each user through a unique URL. The web content should be the 
same for all users, they just need to each connect to a separate database.

- sf

Lindsay Hausner wrote:
> 
> -----Original Message-----
> From: Steve Finkelstein [mailto:sf <at> stevefink.net] 
> Sent: Thursday, June 28, 2007 11:06 PM
> To: users <at> httpd.apache.org
> Subject: [users <at> httpd] Application using Apache and URL schema inquiry
> 
> Hi all,
> 
> Hope this forum is appropriate for my dilemma.
> 
> I'm currently looking for an elegant solution to the following problem.
> I have an application where each individual user logs into
> http://username.foo.com to access their vhost/own document root.
> Unfortunately, when you have a great deal of users, this adds quite the
> administrative overhead with maintaining each document root amongst a
> myriad of other issues. I'm looking for a more proper approach. If
> anyone can suggest how they solve this matter, I'd appreciate it. Here's
> my current thoughts:
> 
> a) We ditch username.foo.com. EVERY user gets redirected to
> http://application.foo.com/appname or whatever URL we decide
> on. The backend database however, will be unique for each user. The
> variables for database connectivity will come from PHP's environment.
> The application will keep track of the username and dynamically connect
> to the appropriate backend database.
> 
> b) Completely arbitrary URLs. Using mod_rewrite and mod_auth, the
> following is maybe possible? This seems the most elegant approach if
> it's possible.
> 
> http://md5value.foo.com/application
> 
> This way users can't just guess away at URLs. They'd almost be dynamic,
> if that makes sense. I don't want users being able to do
> http://username.foo.com/hack.php?foo=bar etc.
> 
> Is there a way to use hashed directories and perhaps a mix of
> mod_rewrite to make something happen?
> 
> Thank you kindly for your insight.
> 
> - sf
> 
> Why not use mod_userdir?
> 
> lh..
> 
> 
> 
> ------------------------------------------------------------------------
> 
> !DSPAM:1020,46852aee650495369021049!

---------------------------------------------------------------------
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-unsubscribe <at> httpd.apache.org
   "   from the digest: users-digest-unsubscribe <at> httpd.apache.org
For additional commands, e-mail: users-help <at> httpd.apache.org

James White | 1 Jul 2007 21:37
Picon
Favicon

setting ORACLE_HOME

Hi,

I am trying to install Oracle XE to run PHP scripts. I have read that it
is preferable to set ORACLE_HOME before starting Apache instead of using
putenv() in the PHP script. I have tried the recommended script.

ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
export ORACLE_HOME
echo "Oracle Home: $ORACLE_HOME"
echo Starting Apache
/usr/local/apache/bin/apachectl start

Unfortunately this does not work and I still have to use putenv(). I am
using PHP as a cgi.

How can I get this to work?

Jim

James White
Programmer
Biodiversity and Spatial Information Center
North Carolina State University
www.basic.ncsu.edu

---------------------------------------------------------------------
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-unsubscribe <at> httpd.apache.org
   "   from the digest: users-digest-unsubscribe <at> httpd.apache.org
For additional commands, e-mail: users-help <at> httpd.apache.org

Cathy Murphy | 2 Jul 2007 02:39

How to serve images from memory?

In Apache, is there a way to serve images from memory instead of disk?

-Cathy
www.nachofoto.com

Sean Carey | 2 Jul 2007 03:51
Picon

Re: How to serve images from memory?

Im not sure about httpd, but you could always use squid.




Cheers,

Sean Carey
617-820-0563

Sent from my iPhone

On Jul 1, 2007, at 8:39 PM, "Cathy Murphy" <cathy <at> nachofoto.com> wrote:

In Apache, is there a way to serve images from memory instead of disk?

-Cathy
www.nachofoto.com

Gmane