joe-f: I would say yes but if you happen to open exactly the same stuff you already have open, then browsers could do something tricky
joe-f: but.. yes, most likely atleast HEAD requests are made to server host to check whether content has changed
joe-f: ..or not HEAD but GET with check whether content has changed
i didn't know REFERER had anything to do with the changing of content.. hm
it doesn't
anyway, what is your question/problem ?
i just want to know if a user opening a link in a new window, from my site, will still be marked as a REFERER on the site the user is opening
not completely apache related i know, but kinda..
joe-f: if user opens a link, the request has referer *unless* the user, browser, firewall or something strips it off. you can't trust referers.
alright, so having it opened in a new window/tab doesnt matter
makes sense
thx
1) Apache doesn't run as root (only the parent process responsible for openling logs and binding to ports 1024) and 2) The UID Apache runs as has to have traverse access to any directories (and their parents) it must read content from.
6 2007] [error] [client 192.168.103.69] File does not exist:
and?
my url was http://www.mysite.com/incoming
hello. quick question... will mod_deflate work with apache as a proxy server? i.e. will it deflate proxy requests?
for some reason it's getting rewritten and i can't figure out why
I doubt it
Roobarb:
what directory is your DocumentRoot ?
Is there a way to limit the amount of memory an httpd child process is allowed to use?
well, right now i'm thinking about moving user's public/secure outside of /home/* so they can have o-rwx and making symlinks so they can easily get to those directories. the directories are setgid apache so any new files or directories will be group owned by apache. is this bad or can you think
of anything simpler?
RLimitMem
the goal is to keep user's out of each others' home and web directories
I thought that was only for processes that httpd spawned (I may have misunderstood the docs)
how can I activate php5 hosting with apache2? I can with apache 1 but I dont see the way with apache2
oh I see. I don't know whether you can control how mych ram Apache itself uses (short of ulimit)
php
is a scripting 'language' that is enabled by loading mod_php and by adding 'AddHandler application/x-httpd-php .php' or you can look at http://wiki.apache.org/httpd/PHPDownload
DocumentRoot is DocumentRoot /var/ee/www, http://apache.pastebin.ca/606435
Line 69
what is wrong ?
Questions of the form "what's wrong with ..." can't be answered unless we know what you're trying to do.
nothing, its Aliasing /incoming to "/home/ftp/pub/incoming"
that should be OK
Hi i have apache2.0.54 running on debian sarge with PHP5 (SUPHP/PHP5-CGI), i am having problems with large file uploads, php webhosting is configured correctly but when uploading a 50 odd meg file the client stops sending data near the end with but the
browser just sits there still saying sending, server side apache is showing that its returning a 400 http status code for the post request? any ideas, please.
you're trying to use a VirtualHost and main config to serve content on the same ip I think
anyone have an opinion of Ruby on Rails - good? bad?
in my apache2.conf I dont have any refference to PHP, any
then add it
the last one?
the last one is the [L] one, by definition
Roobarb, what do i need to change?
load the php module, and put the AddHandler line next to it
that depends on what you are trying to achieve
you have a VirtualHost listening on Port 80, as well as a main config. I think the VHost is being selected first
In fact, I dont have any LoadModule line apache1 was more easy
Roobarb, that should be fine, either way
take a look at http://www.linux-corner.info/httpd-simple.conf for a proper VHost example
-- gone
you are using debian/ubuntu, I assume?
thumbs, debian
I just did it with apache1, just uncommented a line, but in 2 i cant find the line
default layout
Pop along to http://wiki.apache.org/httpd/DistrosDefaultLayout for an idea on where the main distros place Apache files.
read that factoid, please
I know where my apache2.conf is
but inside apache2.conf I cant find anything about php
Roobarb-Work, i just got rid of VirtualHost, but same behavior.
Roobarb-Work:
the trick is, you DON'T want to edit apache2.conf
debian does NOT use that file.
going to ask google groups.
php
is a scripting 'language' that is enabled by loading mod_php and by adding 'AddHandler application/x-httpd-php .php' or you can look at http://wiki.apache.org/httpd/PHPDownload
debian php
debian php is here http://wiki.apache.org/httpd/ScratchPad/DebianPHP
http://wiki.apache.org/httpd/DebianPHP
i'll see
apache1 was so easy :'(
no, debian is a mess
debian--
wine++
if you used a sane distro/package, you would simply edit httpd.conf
but no, debian decided to create unmanageable structures that require digging to simply find a config file
Bonsoir / Good evening
hi
hey anapi, how are you doing?
fine, and you ? : )
)
hi thumbs, lamp
quite fine thanks, friday, free weekend, few glasses of wine
)
I need help
hi
yes, you do
Thank you
i need help too :o
well, at last it runs
Can anyone in here tell me how to get flash to run through apache
google is at a loss for me..
http://www.newgrounds.com/audio/view.php?id=204148&sub=50029
flash does not run on apache
that sucks....why not..
now mysql :'(
flash is invoked from html
Hi
flash runs in your browser
flash run in the browser
tell your html to load flash content.
see #web and #html
run the file from browser it plays correctly.....access it through the server it;s there just not playing
apache does not run flash
flash is embedded in html content.
so embed it, and it'll work
I got an idea
send it with the proper mimetype
What can you explain (apache + suphp + php4) that after few hours, connections are never closed ? http://apache.pastebin.ca/606464
hang on
matt you're prolly having trouble with MIME type
matt ran away :o
he was clueless
yea
:|
and he didn't stay around
i hate that
you help someone and they just bail
anyone have any experience with Ruby on Rails?
a bit
Good experience? Bad experience?
fantastic. I would be doing it now if I had anything to do with it.
any reason why you're still using php4?
thumbs, not me, a customer... !!!!
really? is it yer first framework?
I just discovered cakephp
so I'm on the fence
of learning either ruby or something i already know but not as popular
it was my first, but it hasn't been my last. Ruby in general is an infinitely better language to work with
cool
rails is still my favorite thing to work with. CherryPy isn't bad. Django I've only touched on a little but around here it seems popular
yeah php is nice n' easy but there's a massive trade off with what you can do with it
in terms of performance you may find this interesting: http://wiki.rubyonrails.org/rails/pages/Framework+Performance
nice thx - this is absolutely something i've been loking for
think its quite dated so not sure how true it is now, but if gives you a general idea
thx
people talk about speed as rails' weakpoint. it actually did better than I would have thought.
bpeople talk about speed as rails' weakpoint. it actually did better than I would have thought./b
in fact it did damn well
and on mongrel too
tbh i've never really got into ruby, ive always been more of a php hosting person. but then i dont like frameworks really either
i'm jsut cautious about technologies being popular just because their fads - you know what i mean? Like CORBA during the 90's
don't want to learn something that's gonna be traded up with the next fad
or java
java is great for engineering next generation solutions to enable maximization of developer income by means of enhanced buzzword useZthe future. assuming they can make the connector between tomcat/apache a little more solidQvery good at dumping meaningless exceptions giving no clue about the
real problemba funny little story at http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html
and if its about one mongrel instance, you can easily set up two!
fajita feels strongly about this
huh?
whats with her random letter bug?
i mean shit - java web hosting got blown away by flash in the client applet market
...if you missed this due fajitas outcome, "and if its about one mongrel instance, you can easily set up two!
shows it doesn't matter how powerful or feature ridden a tech has
i've always considered java to be too bloated, though in terms of managing the code java is quite nice for larger projects
never really considered it a contender for client side though
that was the java dream at the beginning
then they had to switch to server side - then to mobile
java is physically painful for me to program in. Its pure anti-logic.
java makes me wanna poo
well considering your a ruby person that makes sense
C# makes my head hurt. i think its perls fault.
java is kinda the opposite to functional style programming
i like my delphi - it's easy n' fast
huh, what language is more logical than java?
java being such a dump ass language
depends on your logic
well, ruby naturally. C certainly is, although its relating exponentially fewer concepts so it has less of a fight there.
python
Programming the way Guido indented it
this bot is a wit
yay! it works... after much delibration I give to you... my modified autoindex (please don't laugh) http://nightkhaos.homelinux.org/files/
30% shinier than the previous autoindex
ok. about ruby I have only basics on ruby on rails. about c, it's little bit on different level. but yeah, I have always laughed on java's "platform independence" and performance is a joke in first hand
well at least you didn't laugh.
you don't know that I don't HAVE to type lol every time I fall out of my chair with tears streaming down my face
its the internet. its not a big truck.
but it looks fine.
java and performance dont belong in the same sentence, anywhere!
yep
java is designed to have a good ICON score. ICON being Isolatable Components with Obfuscated Names (essentially a metric of how good a flowchart you can draw of a particular system)
yeah I really need to stratch up on my HTML and CSS and predify it more... having a new icon thing is an improvement through.
indeed
how does this relate to apache?
autoindex.
autoindex is See mod_autoindex
about as much as ruby/delphi/java/php etch
but at least I am talking about a direct function of apache rather than something that can be used in conjuction with apache.
sorry, didnt mean it like that, what i meant to say was more relevant than ....
hi. i have a page that will display in FF on linux, and IE on windows, but FF on windows gives a internal service error
this (unfortunately) isn't my apache, so i can't refer to the log
step one?
whatever the problem, step one is to look in the error log (and any other logs that may apply, such as suexec, mod_rewrite, or mod_security).
any suggestions on how to track things down?
essentially, i need to be able to point the admin in the right direction and take the heat off my back...
yes. im not a dumbass thanks though
internel service error? how exactly are you attempting to access the page?
presumably it's doing some sort of user-agent thing and blowing it
what type of page is it? html or a server side parsed page(php/perl)?
yeah. thats what im thinking also. which is going to be damn near impossible to detect on the client side of things
I didn't think so but what exactly does the error log tell?
php i image
you can set your user-agent string
2 thing i said was this isnt my apache install
experiment with curl/wget, for example
GREAT idea
go get the User Agent switcher extension for FF, it'll make that easier
livehttp headers in ff is also quite usefull to see what is being sent and recieved
2 thing? "ok"
2nd
ah
oh, another thing could be content negotiation
grabbing it now, ty
maybe your ff/windows install is asking for a language which it has trouble with.
or a mime-type, even
its pretty consistent on the different machines in my office, so maybe, but more unlikely than the UA detection
Would that affect php phasing?
just an idea, trying to run through the possibilities
depends on what the php script is doing
I didn't notice your comments about the log before I wrote
livehttpheaders will help too, so you can see exactly what each browser is sending
in any event, looking at the headers sent by the different browsers should give you a better idea
its ok. sorry i was short
I wouldn't think mime type would unless there is an embedded object.
internal server error could be the php process crashing out
undoubtedly
well, actually, maybe not... it could be in the apache config, too, if they're using .htaccess
but probably it's in the php
aye. and if that is the problem, why does PHP phase in the other broswers throughout the building?
the php script may have some code that is dependant on the user agent
both http (or https?) ?
if that is so it wouldn't have phased in Linux FF.
why?
phased?
my bet is that its triggering some IE compatibility code by mistake that is miswritten
the UA contains the OS too in most cases
hmm true, but if you forget to add the FF-UA for windows, why do you remember it for Linux?
its difficult to say as the php script could be doing practically anything
im checking the UA now. brb
incorrect regex in rewritecond falls through to an invalid rewriterule that generates a 500 for example
well one would have thought you wouldnt bother checking the OS in the UA, just he main part like Gecko/ or Firefox/
in english?
but you never know
one would have thought, indeed
but people do the strangest things
incorrect rewriterule seldomly is dependent on browser
just need to look at the daily wtf to see that
and even more seldom generates 500s
is this a website I am nieve about?
you can generate a 500 with a disallowed directive in an .htaccess file. but it takes some work to make that conditional
http://dailywtf.com
bingo. that is it
sorry thedailywtf.com
now to pass the buck
thanks a ton everyone
where's the buck, where's the buck
tell them to stop trying to micromanage the user agent
it's bound to end in tears
with rewriterules being interpreted first, it would be tricky to hide bad syntax in a RewriteCond looking at request headers
impossible
it's not impossible, it's just infinitely improbable.
...as somewhat hockey fan
the directives are parsed first
Is there something (maybe a plugin) that allows to add some HTML stuff to a served (either a static file, or content generated by PHP) text/html and text/xhtml page ?
i would need that to add some advertissement on free hosting
mod_include
mod_include is http://httpd.apache.org/docs/mod/mod_include.html or http://httpd.apache.org/docs-2.0/mod/mod_include.html
mod_filter
mod_filter is http://httpd.apache.org/docs/2.2/mod/mod_filter.html
comedy option, mod_ext_filter
thank you very much
I am hooked.
lol, you can waste hours on there, its such a laugh
where?
thedailywtf.com / worsethanfailure.com
heh
hmm, anyone here use jmeter with mod_deflate?
hola
hola, como estas
errr, good, if i understood you correctly. You?
qué usted dice siempre
well, I don't speak a word of spanish except ordering a beer
haha
that's a little more than I speak then
it's been a quiet day in here today, hasn't it
not as delightfull as with simonko19 but not too busy
karma mcu
mcu has neutral karma
uh
Is there any easy way to check which modules are running under a given apache (either statically compiled in or dynamically loaded)?
httpd -M
httpd -M lists both statically and dynamically loaded modules for apache version 2.2 and higher
check the status page?
pctony++
hehe, ta
or -l for the staticly compiled, previous versions
or check "httpd -l" and LoadModule lines
interesting. I guess I have apache 2.0.
you guess?
httpd -V
httpd -v returns Apache's version number. httpd -V returns compile settings, too.
upgrade?
Old Apaches are harder to support than newer Apaches. Please upgrade. (2.0-2.2 http://httpd.apache.org/docs/2.2/upgrading.html)
but the only way a module gets loaded if it's NOT listed under ./httpd -l is with a LoadModule directive, right?
I doubt it'll be a simple upgrade path. Solaris doesn't have apt-get...
pkg-get
(blastwave, the open source repository for solaris)
whoa.
I know kung-fu...
with solaris, rather compile from the source
packages from sun are not that good
Reading up on blastwave.
rather read httpd.apache.org
all in good time
hmm, I am trying to get the deflate module installed, and it doesn't seem to be working. I am using "--enable-deflate", any hints?
proxypass?
proxypass is http://httpd.apache.org/docs/2.0/mod/mod_proxy.html#proxypass
beer?
lol
nevermind, I got it
pound signs in you eyes?
any references in config.log to deflate or zlib? Do you have zlib headers installed?
no, I just didn't have my config var in the right place.
je ne t'aime plus mon amour
karma lamp?
lamp has karma of 27
seen Daveman?
0
oh my
i like this one:
fajita, windows
windows broken, please use door
manu chao is replysee http://www.manuchao.net/
OK, lamp.
manu chao?
see http://www.manuchao.net/
nice
fajita, button
See that big red button over there? Right. That One. Never ever press it. Seriously, I'm not joking around.
any Amazon S3 and EC2 users around?
html is such a jackass format
yeah good thing it never caught on.
rofl
grr, mod_perl!
Roobarb-Work: there is here?
?
hello, how to make https server?
ssl
ssl is *Secure Sockets Layer. Ask me about mod_ssl or ssl vhosts see also http://httpd.apache.org/docs/2.2/ssl/
ssl howto
ssl howto is http://httpd.apache.org/docs-2.0/ssl/
is there a way within the virtualhost to permanently redirect a www to a non-www?
www
www is deprecated (http://no-www.org/)(not deprecated (http://www.yes-www.org/).possibly deprecated (http://ww.maybe-www.org/)
lol
some solutions written up there that should cover your needs
Proceed with the installation of the 3 packages? (0 MB) (Y/n) y
installing libapr_memcache0-0.7.0-8mdv2007.1.i586.rpm apache-mod_ssl-2.2.4-6mdv2007.1.i586.rpm libdistcache1-1.5.1-6mdv2007.1.i586.rpm from /var/cache/urpmi/rpms
mixed amongst the rhetoric should be a tip or two
Actually, no-www is where I got my .htaccess rewrite rule. It removes the www, but also redirects to http from https :|
I got it from here: http://no-www.org/faq.php#how_class_b
so change it to redirect to https
I bet you can guess how to do it.
Well, I really want it to STAY on https if it's https, or STAY on http if it's http
use absolute urls
or relative urls
relative urls is only useful for relative things
but don't use a fully qualified uri
I'm sorry, what?
sorry, is that a fundamental feature
I'm pretty new to this
rewriterule blah /foo/bar
absolute url
rewriterule blah foo
rewriteguide
http://httpd.apache.org/docs-2.0/misc/rewriteguide.html http://httpd.apache.org/docs/misc/rewriteguide.html http://www.engelschall.com/pw/apache/rewriteguide/ http://httpd.apache.org/docs/2.2/rewrite/rewrite_guide.html http://rewrite.drbacchus.com/ http://httpd.apache.org/docs/1.3/misc/rewriteguide.html
relative url
fully qualified uri
but how do you remove the www if you don't use the full uri?
that's the rub
:P
rewritecond
rewritecond is http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewritecond
there's a list of env vars
that you can use in the rewriterule
hi, Roobarb-Work are there here??
hi, Roobarb-Work are u there here??
didn't we have a redirectmatch solution for non-www to www? coulda sworn we did
it's in her brane somewheres
i'm having trouble with CGIs on windows
she-bang line
[ http://pastie.caboo.se/76758 ]
usually the problem i see with windows and cgi's
well, the she-bang line is '#!/usr/bin/env ruby'
apache still needs the right she-bang line for cgi's
and does windows have a /usr/bin/env?
:P
the ruby docs say to use that she-bang line...
do you think they are in error?
that's for *nix
they say to use it for windows
most docs are written in the *nix context
well that would just be plain wrong
well, actually, a tutorial says that
if you're running ruby under mod_cgi
yes, you're probably right
no, just plain cgi
yeah, that's mod_cgi
but the script works when i call it from the dos prompt
oh....
dos prompt != apache running it
apache uses the she-bang line
and dos prompt does not?
nope
ZOMG!11!!!
okay, so i need to turn the shebang line into '#!/where/ruby/is
something like that
did you read the logs i posted? [ http://pastie.caboo.se/76758 ]
#!c:/path/to/ruby
oh, i see
don't need to... not until you put in the right she-bang line
oh, okay.
the logs say, 'system can not find the path...'
there ya go
that == bad she-bang
that's the only reason i asked you to look -- to confirm my suspicion that you were right
thank you
np
happy cgi'ing
winows is stupid like that
I solved my problem. It redirects my .com, .net, and .org all to the .com ...removes the www. ... and keeps the user on http or https (whichever they were on to begin with): http://paste-bin.com/12062
nice job
thanks...I asked for help in here so many times, I hoped someone else could use it.
http://aaron.xavisys.com/redirecting-all-serveraliases-to-a-preferred-domain-with-mod_rewrite/
Nasty long title, but it's accurate
Would this be the correct place to ask questions about mod_rewrite?
i'd ask anyway
That can be dangerous on Freenode :x
people ask about mod_rewrite here all the time
I'm just wondering if there's any way you can re-write everything after the URL, ie: http://www.mysite.com/rewrite-this I've tried: RewriteRule (.*) blah.php?page=$1, but for some reason it's storing "blah.php" in the page variable
I've also tried RewriteRule ^/(.*)$ .., but that doesn't even work aswell
s/aswell/at all
RewriteRule ^(.*)/$ /blah.php?page=$1 [L]
RewriteRule ^(.*)$ /blah.php?page=$1 [L]
tried that aswell :/
I thought it might've been that it was looping back and that's why it was getting "blah.php", so I added the [L] and got the same results
it seems it was X_x
added some checks with RewriteCond checking if the filename existed
and that's what it was doing, redoing the checks, even with [L] present
weird
So add these conditions:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
That's what I did xD
cool
It's weird that it redid the checks with [L] specified though
well, thanks for the help
query_string
query_string is a reserved var
qsa
qsa is query string append or a flag for RewriteRule or see the RewriteRule Documentation http://rewrite.drbacchus.com/rewritewiki/Flags_2fQSA
query
The query is the part of the url starting with a question mark. RewriteRule and *Match directives only see the location, not the query. or check http://wiki.apache.org/httpd/RewriteQueryString for mod_rewrite related examples
read that
or both
I should dig out the mod_seo i wrote once
i still think you should do that crap in the script, rather than tying yourself into rewrite knots
is Keepalive better switched off on a dynaic website ?
dynamic? how is it dynamic? like php / cgi? or dynamic dns?
yeah PHP
yeah PHP is nice n' easy but there's a massive trade off with what you can do with it
doesnt matter
I read in a few places that the standard setting for apache 2.x isnt very efficient for serving PHP pages
like KeepAlive at 15 seconds will just kill a faorly busy box
benchmark it yourself. otherwise its premature optimization
and you could be making it worse
Ive benchmarked and found that Ive just got loads of clients hanging around
wiaitng for keepalive to time out
anyone got a good tool to diagnose apache bench results over time?
hey anybody know how I can change the directory to something other than /var/www? I've checked the apache2.conf file and can't find anything.
documentroot
DocumentRoot specifies where apache should look for content. See: http://httpd.apache.org/docs/2.2/mod/core.html#documentroot or http://httpd.apache.org/docs/2.0/mod/core.html#documentroot or default layout.
in deb/ubuntu, look in /etc/apache2/sites-enabled/000-default
k thx
i have a question about using a + or -, I have this-"Options MultiViews -Indexes Includes FollowSymLinks" , is FollowLinks in "-" or in a default "+" , anyone ?
it's enabled
it's not a default + or anything
+ means inherit previous options
- means disable this option in the current scope
so if you had /var/www/html with Options FollowSymlinks and you did /var/www/html/blah with Options +ExceCGI, that means that /var/www/html/blah will have FollowSymlinks and ExecCGI allowed
now let's say /var/www/html/ had Options FollowSymlinks Indexes and /var/www/html/blah had Options -Indexes ExecCGI... that means that /var/www/html/blah will not have Indexes set and will only allow ExecCGI
in short, + means "add this option", - means "remove this option", and leaving out the sign means "i was too lazy to type a character and i'll regret it in the morning"
eh?
it seemed like an easier explanation
leaving it out on all options means these listed options are explicitely allowed in this scope
leaving + out that is
and only these options
leaving it out on all options is ok, as long as you just have one options directive
afair, + is an inheritence operator
yes, so is -
yeah
technically
but it gets confusing if you have a mixture of +/- and unmarked ones
yes
i think the docs tell you not to do that
heh
although 2.2 is supposed to do something sane
and doesn't discourage it
for some definition of sane
yeah
which ironically isn't explained i don't think
it actually would have been way better to have had separate directives
I personally don't use +/-
every location/directory explicitely has their own options
that's the other possibility. list them all.
sometimes determining which options get inherited from where or what actually gets inherited is a pita
can be almost impossible if you have a complex config
indeed
is there a tool to run against the apache server, to spill out current settings for a url or local filesystem path?
hrm...
not that i can think of
just your eyes
and your brain
it's tricky because every module is responsible for it's own configs
yeah
they generally don't release the details of their config info
but a tool like that could be useful...
yes, i agree
there's a debugging tool in the oreilly modules book, sadly out of date
which tracks merge operations, sort of
but it doesn't insert itself into modules' private data
(and not Options +smthing) , means that the feature is inheritably available
you start with a bag of options
it means only that option is explicitely available
to that scope
then apache runs through all the applicable sections, directories, files, locations.
does anybody run a dynamic PHP site with apache ?
I'm trying to use mod_rewrite but I've run into some trouble. I tried the rule "RewriteRule ^(.*)$ $1". I don't think this rule will change the URL. However, when this rule is in effect, the server shows a 404 instead of the desired page. Why?
vhosts etc.
in order
rici, and "+ smthing" means it is not to be available for anything else, correct?
no
there's just a bag of options
if the section says +foo, apache puts foo in the bag
if the section says -foo, apache takes foo out of the bag
if the section says options foo bar,
apache empties the bag and just puts foo and bar in it
after it gets through all the sections, whatever's in the bag are the options
so it's really simple, except for figuring out what order apache applies the sections
rici, what i meant about inheritably available, doesn't mean it getting set for any possible subdirectory context for example..
it is no more complicated than i described it
anyone know how to load apache at startup for ubuntu when installed from source?
secctions, it would be easy
rici, where's this in the doc?
you need to create your own init.d script
apache applies the matching ones in order shortest-to-longest
where it gets complicated is where you mix location and directory and use wildcard patterns
apache.org's source tarball won't provide that for you
sections
sections is http://httpd.apache.org/docs/2.2/sections.html
is where it's described
do you know a site that has a walkthrough for that?
i can give you my piece of shit one
oh but i'm not sure if it'll work for debian
since it's a redhat init.d script
thats ok
ill look online
i understand sections, but it's the + and - with Options
chkconfig blah blah /sbin/service style
rici really gave a good simple explanation of it
take a step back and let it sink in
megaspaz, yes I know.. I'd also like to know where in the doc this is..
sections
sections is http://httpd.apache.org/docs/2.2/sections.html
options
options is http://httpd.apache.org/docs/2.0/mod/core.html#options or http://httpd.apache.org/docs/1.3/mod/core.html#options or see 'Options Context' Don't mix
'relative' and 'absolute' values. See: http://www.onlamp.com/pub/a/apache/2005/09/08/apacheckbk.html
that'll describe the +/-
the sections one is really important
yep
merge both
so you don't need to look at mine then?
particularly "how the sections are merged"
i have this line in a conf file-"Options MultiViews -Indexes Includes FollowSymLinks" , why would -Indexes be there if it was not in the bag in the first place?
it wouldn't
well, there's no need for it
it came from somewhere else
but that's the sort of line you should never put in a config
but that depends on where it's at
that line is wrong wrong wrong
rici, so there is inheritance taking place..
don't try to figure out what it means. fix it.
again it depends
rici, no i'm not trying to figure out-- just understanding why this came bundled in a package like this..
because someone fsked up
if that line you pasted came from /var/www/html/blah but /var/www/html never had indexes, then -indexes is a useless line
IfModule mod_userdir.c
Directory /home/*/public_html
AllowOverride All
AllowOverride All is a really bad idea, because it implies AllowOverride Options, which lets people do stuff like Options FollowSymlinks and Options ExecCGI, even though they are explicitly disabled in the main config.
i pasted jsut 3 lines..
this is an insecure setup of course-- this isn't my setting..
fajita:test
what?
fajita:override
i'm not following you...
i think that -indexes in that particular line is useless
it's also mixed
since the first option is neither + nor -, apache's already emptied the bag by the time it hits it
yep
so it's not doing any more than confusing you and making more work for apache's parser
however, it's a bad bad idea
and rici :P
luckily i touchtype
heh
options
options is http://httpd.apache.org/docs/2.0/mod/core.html#options or http://httpd.apache.org/docs/1.3/mod/core.html#options or see 'Options Context' Don't mix
'relative' and 'absolute' values. See: http://www.onlamp.com/pub/a/apache/2005/09/08/apacheckbk.html
rici, what do you mean making more work for apache's praser? it's in the ifmod section and will be parsed once no?
Mixing Options with a + or - with those without is not valid syntax, and is likely to cause unexpected results.
from the docs
have you run a heavily traffic server with PHP ?
nope
shiznet ?
although you will find a certain cynicism about php in this channel, i think that if you look around,
you'll see an awful lot of sites using it
like php.net
:P
thousands of sites use it
so can I place an .htaccess in ~/public_html or do I have to edit the ifmod section ?
you mean that a lot of people in this channel dislike PHP ?
if you're using that config you pasted, you can do .htaccess since you have allowoverride all
php?
is a scripting 'language' that is enabled by loading mod_php and by adding 'AddHandler application/x-httpd-php .php' or you can look at http://wiki.apache.org/httpd/PHPDownload
blame php
PHP should be presumed to be at fault until conclusively proven otherwise. And even thereafter, if it's convenient.
FollowSymLinks .. and is not working..
doesn't work?
Look buddy, doesn't work is a strong statement. Does it sit on the couch all day? Does it want more money? Is it on IRC all the time? Be specific! Examples of what doesn't work (or the URL) tend to help too, or pastebin the config if that's the problem
i presume it may be my setting, or because the target is on another partition-- (though my id user name is mounted as owner on the target directory)
fajita, php
is a scripting 'language' that is enabled by loading mod_php and by adding 'AddHandler application/x-httpd-php .php' or you can look at http://wiki.apache.org/httpd/PHPDownload
followsymlinks can be tricky
I think theres nothing wrong with php
it's just a tool.
I'm trying to figure out how to use mod_rewrite. Maybe somebody can help me.
so is apache
indeed
From my understanding, "RewriteRule ^(.*)$ $1" will not change the URL
is that correct?
have you used httplite ?
yes, that's correct
you can also use - as the second argument if you want to do nothing
however, you should be aware that mod_rewrite rewrites urls into filepaths
not urls into urls
ok, so without the rule my page loads correctly
although it can get confusing with .htaccess
but when I add the rule in, I get a 404 for the same URL that previously worked
yes, the url doesn't work as a filepath
this code is located in httpd.conf if that makes a difference
read the bit in the rewrite docs about [PT]
ok, thank you
I don't understand why it doesn't work
the rewrite rule is supposed to generate a file path?
yes
that's the point of rewriting
to derive a filepath from a url
sections, mod_rewrite helps out by translating the prefix of the url to the appropriate filepath prefix
outside, in server context, it just expects the rewrite rule to produce a filepath
I guess I don't understand what a filepath is
the path to the file
relative to doc root
how can I find out what the doc root is?
DocumentRoot
DocumentRoot specifies where apache should look for content. See: http://httpd.apache.org/docs/2.2/mod/core.html#documentroot or http://httpd.apache.org/docs/2.0/mod/core.html#documentroot or default layout.
not necessarily
you can rewrite to a filepath outside the docroot
can be outside of doc root?
sure, like alias can be
only relative filepaths are relative to docroot
Hmm, never tried that.
you can replace alias with a rewrite rule
sorry for the misinformation Rigdern
so it says that "/Users/rigdern/Sites/somesite" is not found
but I can cd to that path so the folders do exist
I've got a question about mod_rewrite
is it possible to do a rewrite rule specific to a server alias?
yes, put it inside a vhost
if it's an existing absolute path, why does apache give me a 404?
ok...
404
404 is Not Found
I've got a vhost with a server name and several aliases...
where in there would I put the rewrite rule?
oh, you just want it to apply to one of the aliases?
well, that's only slightly trickier
precede the rewriterule with a rewritecond matching on %{HTTP_HOST}
oh!
keen
that's the path you're generating with the rewriterule?
yes
I've never used mod_rewrite, so ... crossing fingers
dunno then.
try enabling rewrite logging
rewritelog
rewritelog is http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html#rewritelog http://httpd.apache.org/docs/mod/mod_rewrite.html#rewritelog.
Use this logging to help design and track rewrite; see also rewriteloglevel; and cannot be used from .htaccess
did you check your error log?
maybe it's refusing to follow a symlink
there aren't any symlinks in that path
do you maintain heavy traffic servers ?
not any more
define heavy?
arreyder 1 million page impressions a day
ok then I do, we get than in an hour
you get a million page impressions an hour ?
yes.
on one server ?
no, many servers fronted by a cluster of reverse proxies
most of the applications are not clustered however
ah ok
a few big ones are.
rici, ok, i found out, that using nether + or - makes a new bag explicitly..
Im doing my 1 million impressions a day on one server
congratulations
heh, thanks
what type of content do you serve ?
you name it, I serve it.
did you have some questions, tuning, architecture?
just no mod_rewrite. I already blew one of those tonight
yeah I did, and I guess you sound like the guy who will probably no the answers
heh, dont worry, its not mod_rewrite
Basically I server PHP pages, but each process is 10Mg each
also I have KeepAlive set to on, with a 10 second KeepAliveTime out
I like KeepAliveTimeout 1
the load on my server always hovers around 10
what kind of load?
io wait, cpu?
disk
disk is slower than ram
databse running on same server?
logging to same filesystem as content?
what I was guessing, is that since each http process uses 10Mg to 15meg...MaxClients 500.....KeepAliveTimeout at 10 secs....
I run outta ram and disk swap apache processes
the keepalived connections arent going to eat much ram
so not relavent.
same server yes....although last night I move the db onto a different server and my load is around 0.* to 3.* at peak times on each server
yeah that had to help.
you might consider logging remotely as well
at peak times on the same server I was getting load of like 20+
the logs get wrote to a different RAID array
chances are thought the db was quite a bit of your io wait
it could have been....but the now db server has a load of 0.x as well
still, even to a different array it will cause some wait
I never would have expected database and apache on same server would cause the load to be 10 times greater !
so how is it now? the web server?
what type of db reads? random?
webserver is between 0.* to 3.* at peak times
so it the database server
ram is about all you can do for random reads
db is random reads
I've never had much luck optimising for random reads situations
I just throw memory at them
how do you mean random reads exactly ?
not a lot of cache hits
send the drive heads scurring around
you can go with a higher number of smaller disks
ah right, the cache gets hit quite fairly
more disk heads looking for data == less seek time
yeah, we had like 6 disks in raid 10
more disks would help
What are the is the recommended ways of supporting different SSL hosts for name based virtual hosts? Ports or IPs for each SSL service?
ssl
ssl is *Secure Sockets Layer. Ask me about mod_ssl or ssl vhosts see also http://httpd.apache.org/docs/2.2/ssl/
ssl vhosts
When using SSL, each virtual host must have either its own IP address or its own port. Or both. or for details see http://httpd.apache.org/docs-2.0/ssl/ssl_faq.html#vhosts2 or http://www.onlamp.com/pub/a/apache/2005/02/17/apacheckbk.html or see SNI or consider wildcard certificates or http://wiki.cacert.org/wiki/VhostTaskForce or see ip based
vhosts
IP's but if you have wildcards certs can get by with a single address for each wildcarded domain
ssl howto
ssl howto is http://httpd.apache.org/docs-2.0/ssl/
so theres not much benefits from tweaking apache config, in relation to KeepAliveTimeout etc ?
I have that implemented already for wildcards, but now my customers want their own SSL certs for thier own domains
already implmented for a single wildcard.
are you hitting max clients? if not, then no I do not think the keep alive can do much to help you
Ok, looks like I am going IP shopping, thanks.
yep, more IP's
yes, I used to hit max clients before I split the db onto a seperate server
I had max clients of 500, and each http process used 10 to 15 Mg
thats 6.5G
not using keep alives at all will keep you able to serve more requests, but will hurt the user experience a bit and cause a little more overhead for connection builds/closes
I really like keepalivetimeout 1
it's about as a good of a comprimise as there is
is that 1 second after all requests are servered to thet client ?
whats this app?
or 1 second including serving tim eand waiting afterwards
between the end of the response and the next request
really ?
it's almost always enough if they're streaming requests for images or whatever
so if someone clicks a link....say it takes 12 requests to css, images etc, taking 3 seconds to build the page
then it would wait for 1 seond in arreyder 's case
those requests will happen on one connection
its an online game
or two if your browser decides to split them
so whats the point in having keepalivetieout greater than 1 ?
I can't see the point
there was a theory at one time that people tend to click pretty often
and that it's worth holding open the connection for the next click
i set mine to 300.
but I'm also using the event mpm
also, in places where connectivity is lousy, 1 second might not be enough
1 second isn't enough for most of the world
for example, if you're connecting over a satellite link
metro US on broadband, 1 second is fine
browsers should pipeline. i don't know how many do
not enough
but is it not 1 second after the content has been server...ie 1 seond idle
the last byte leaves the server
bounces off a bird
its one second after apache sends the last byte
arrives at the client
the client responds
bounces off the bird again
and reaches the server
that's four ground to sat delays
the client responds, renders, runs 300kb of ajvascript
the birds hang out 40000 km about earth
and then about a second or five later, renders a bunch of DOM nodes.
the speed of light is 300000 km/sec
heh
so thats about 0.6 seconds just in satellite time
not counting the terrestrial links, routing delays, and various etc.
so its got 1 second to reach the client
2.8 :P
yeah, i'm approximating
a typical sat conn rtt from, say, la paz to london is 900ms on the average
you approximate, and I use the wrong word that sounds the same but is spelled differently
but pings are short
higher keepalive is nice, but the best possible situation is to get 100% cache hits for all the extra resoruces.
mod_never_expire
i'm not following you...
mod_buy_a_lot_of_ram
mod_never_expire is http://people.apache.org/~pquerna/modules/mod_never_expire.c
OK, chipig.
hmm? Just version every resource referenced by html.
and then put it all on akamai....
and bingo.
and bingo was his name-o.
Im still lost as to why anyone would have it set more than 1 second
because the cost of setting up a tcp connection over any high latency connection is insane?
I mean after yourve sent your last byte, so what if it closes after 1 second
agore, if i'm in la paz and you're in europe, say, there's not a hope in hell that my browser can send requests less than a second apart
arreyder doesn't have that problem, i believe
yeah, my users are all very close
and if i lose that connection, it takes about 4-5 seconds to set up a new one, minimum
that really slows down page loading if the pages have a lot of graphics on them
i personally recommend 3
although chipig is more generous
sounds reasonable
he's just trying to show off that event mpm
well yeah, 300 sounds very high, must be mostly same users logged in all day
yes :-)
with that silly timeout
and the new patch that lets it work with mod_ssl!
ah yeah....I forgot he uses that
thats what let me turn it all on
hmm, soon I too will have the event mpm
that's cool.
looking forward to it
did they fix ssl?
oh, no.
it just reverts to the Worker MPM behavoirs, when mod_ssl is active
ah
chipig, can you use php modules with it
poo
its not perfectly optimal, but its the only way out for 2.2
and it lets me mix https and http vhosts on a single mpm
what do you do for dns lookups?
which is what always killed the event mpm for me before in production
dns lookups?
I can't find the machine name "lookups?"
asynch?
httpd never does a dns lookup for me...
ah, i suppose not
you're not running any ldap stuff i guess
Im just gonna leave my timout on 10 cos to be honest Im not sure how it works, but thanks anyhow
best bet is split your disks
watch out for log files
but for the crawlers we use lots of djb's dnccache stuff.
although, i've heard good things about newer bind in a pure cache config
i've been looking through libcurl
curl--
it uses c-ares
c-ares--
yeah, it's got it's issues
i know, i hate c-ares
i was thinking of slugging djb's stuff in there
it works. It could be so much better, from an API perspective.
have you looked at the new multi api?
it's actually quite nice
i was following it a bit when it was being written
it does a callback to tell you about sockets it's interested in
as I said, it's not really going to help your problem much anyway, focus on reducing that io wait
and you call it with a socket and event flag
I really want one consistent event system that I can plug into a dozen different libraries
so it integrates perfectly into libevent
or kqueue
kqueue is chipig's pet APR patch or a poll() replacement for FreeBSD that has increaed performance with many sockets or a poll() replacement for {Free,Net,Open}BSD and OS X
yeah. kinda down the path i was going with apr_pollcb
yeah, it's a good general approach i think
ok
if everyone used it, life would be good
well the server splitting sees to have dramitic effects
how much ram do you have, agore?
16Gb
i think in most of our programs, we have lots of apr_pollset() sets from apr_memcache, a couple libevent contexts from stuff, libcurl multi contexts, and sometimes a litle custom aio for our own services.
it sucks.
yeah
yes, if you have gigabit ethernet between them also look at using jumbo frames to keep some overhead down.
i'd like one simple system
9000mtu vs 1500
but if 500 processes are sitting around for 10 seconds each after finishing serving a client...and I have 1500 people hitting the site at once....1000 are waiting for 10 seconds
they're not waiting
they just have a socket open
but there not getting there pages served
and in that time more people are comming along
they aren't hanging on the socket
but yeah, it does use up resources
so lower it
10 seconds is useless
many images with this app?
people don't click that fast, and click streams don't wait that long
3-5 is good
ok
maybe 10 small images per page
it's the count, not the size, really. these days.
i was going to suggest serving the images from another machine
ah ok
or even another apache
or squid
you can set up a stripped down apache to just serve image files
yeah, ive heard that one before...we only have a small amount of images
yeah, or squid.
right
but our experiments with squid and apache 2.2 don't show much difference
yep, my reverse proxy clusters is a lean mean image serving machine.
it would be nice if you could tell apache's cache to expire a resource
that's one thing that squid has
didnt they add a cache manager to 2.2.x?
does it do the expiry protocol?
keep everything static in memory!
i used to think the same way, but really, versioning URLs/images has made stuff so much easier
god, i've got to keep up with the changes better
I havent tried it yet
i don't think thats in there, is it?
lemmie look
brian from CNN talked about it at apacheCon US, the one he wrote for CNN
image changes, name changes?
that used sqlite and other neat stuff
yes
we actually use SVN revision numbers in the URL
yeah, versioning is probably better
/images/r324324/foo.gif
makes the url's ugly
http://httpd.apache.org/docs/2.2/programs/htcacheclean.html
doesnt do much.
and then an AliasMatch /images/r(\d)+/(.*) /foo/bar/images/$2
yeah, it can't purge a specific URL
and none added PURGE support
it can manage the total size of the diskc ache
brian from CNN ?
that sounds nice, I'll remember that when I play with content stuff next time
the hardest part is geting your content generators to do it
but once they do, it makes lots of things easier
like you can use mod_never_expires
brian akins
and export the images to a CDN
actually plone has a unique resource id for every image
that's translated into a real filename when the page is output
i should talk to them about not doing the translation... hmmm...
mm. can't find brian's slides from ACUS 2006.
anyways, they did lots of things to mod_cache to make it better.
yeah
but most never found their way upstream, because CNN.corp is... paranoid about IP
so I enabled logging for mod_rewrite and I think the problem has to do with the difference between URL's and filepaths
perhaps you're right, versioning might be better than purge
I have 2 rewrite rules that generate the same filepath
never heard of Brian Akins
however, in the one that works, mod rewrite says that it is ignoring the rewrite because it equals the path that was passed to the rule
and I also noticed when apache gives me a 404 for the rewrite rule, it's a filepath
but when I get a legitimate 404, apache prints a URL
would you like to show us your rules or do we guess?
I thought it would be more fun to guess first
RewriteRule ^(.*)$ $1
RewriteRule (.*) app/webroot/$1 [L]
hmm, what is the point of the first rule?
that's the only rule I've gotten to work
lol
like rewriting /stuff to /stuff
yea
so for the first one, I type in http://127.0.0.1/~rigdern/cake/app/webroot/index.php
ok. get rid of that. how about the second one, what is problem? does it loop?
no, I get a 404 for a file that exists
what I did was I only used 1 rule at at ime
I typed the above URL when the first rule was being applied
URL: /Users/rigdern/Sites/cake/app/webroot/index.php [IGNORING REWRITE]
because it's the same as the URL before the rewrite
and I see the page in my web browser
so now I comment out rule 1 and apply rule 2
I type in the URL http://127.0.0.1/~rigdern/cake/index.php
so rule 2 should redirect me to the same URL that I got to from rule 1
are you using that in .htaccess? in ~ridgern or what directory?
(public_html or whatever your UserDir is)
I using it in server config file
Directory /Users/rigdern/Sites/cake
/Users/rigdern/Sites/cake/app/webroot/index.php
but when the page loads in my web browser, I see a Not Found error
so both rules rewrite to the same path
but rule 2 gives a 404
and in the log, it says rule 1's output was ignored
so I think the problem has to do with the difference between filepaths and URL's
no ideas?
little bit strange, you could turn your rewritelog to 9 and see if it tells you anything more
it is on 9
RewriteRule ^app/(.*)$ $1
this one also gives a 404 error even though the file does exist
where in httpd.cnf should I be putting this code?
hello?
Hail, kikkomanchow!
I'm reading help.ubuntu about installing apache.. i dunno what this means : Search both the strings starting by "User" and "Group", and change the names by the current username and groupname you are using. Then you'll need to restart Apache. (look at the next chapter concerning apache
commands)
its refering to apache2.conf
can anyone explain?
user
user is http://httpd.apache.org/docs/2.0/mod/mpm_common.html#user or /http://httpd.apache.org/docs/mod/core.html#user
make_sock: could not bind to address 0.0.0.0:8080
im getting that when i start apache
did it ever occur to you, it's already running?
either that, or you have duplicated configs
hrmm i stopped it and start it again
netstat
netstat prints network connections, routing tables, interface statistics, masquerade connections, and multicast memberships. Use netstat -an grep -w 80 to check if port 80 is in use. (On linux, you can use netstat -pan to see which program uses the port, or -ltpn.) (For Windows use -ano to
show the state, PID, and connection in IP not name format, or -abn).
duplicated configs?
i'm very new to this.. how to i troubleshoot
what distro are you using?
or platform
'What Operating System and apache version are you using?'
Ubuntu Fiesty Fawn?
the dpkg bot is debian specific. ask the ubuntu folks what's the ubuntu way of the same things.
get the factoid?
Apache2 core dumps on solaris.
Now how would I go about debugging this?
gdb?
gdb is the GNU debugger
do you have core dumps?
evening all
ay'
anyone know what these 'internal dummy connections' are?
I ran with -e debug and it seems to barf over fastcgi.
or whatever comes after that.
I've only seen them last I tested something.
I wouldn't know what to do with a core file.
i get a whole bunch of connections from localhost (::1), and they don't close, so Apache just spawns new processes all the time
internal dummy connection
internal dummy connection is http://mail-archives.apache.org/mod_mbox/httpd-users/200604.mbox/%3C4434308F.9030003@googlemail.com%3E or http://wiki.apache.org/httpd/Logs/InternalDummyConnection
imagine that
cheers
if gdb is installed, check the man page. I think it's $ gdb apache core
been ages since I gdb'd a core file
I can't find a core file, actually.
I did a full find.
ah, ulimit commonly prevents them.
removing fastchi seems to have done something.
that's primising.
ulimit -c
hi
I've got mod_auth_pam installed but I can't seem to login
s/login/authenticate/
user 'chris' - not authenticated: Module is unknown
mod_auth_pam
mod_auth_pam is a module that requires access to one's system password file. http://pam.sourceforge.net/mod_auth_pam/ recommends the use of mod_authnz_external as mod_auth_pam is no longer developed/supported
I'm starting it with -D AUTH_PAM
must be RH based?
I've got a shadow group and apache is a memeber
OK, unlord.
bot
Danger Will Robinson!
thanks
I really thought I had this working earlier
I wonder if my /etc/pam.d/apache is borked
Hmm, since when is 'Include' a syntax error?
or, probably, the error messages chain, nvm.
hmm, okay now it authenticates but svn is broken
ahh, apparently I need to move to subversion 1.4
http://forums.gentoo.org/viewtopic-t-567180.html
https://bugs.gentoo.org/show_bug.cgi?id=182453
okay, that should fix it
and it did
how do I check which config files are read?
For some reason, ServerName foo.bar.com in a VirtualHost block is used when I go to just 'bar.com'.
Now how could that happen?
you are speaking in riddles.
Okay, I have a directory with a bunch of scripts. They are all included using a directory Include directive.
All these scripts contain scriptly 1 VirtualHost definition per file.
One of the VHosts has a directive ServerName foo.bar.com
another has ServerName bar.com
Yet when I go to bar.com, I get the stuff I Defined in foo.bar.com
httpd -S
httpd -S tells you what your virtualhost configuration is.
and when I remark the whole foo.bar.com virtual host config file out.. I *DO* get bar.com
odd. they are all listed twice.
this one vhost per file is a nice idea -- but you end up messing stuff up.
It's the default behaviour of debian.
I kind of liked it there so I am (trying to) copy the scheme to solaris here.
into_a_file and pastebin that file.
okay.
one moment.
I'm suspecting one very, very, very simple thing to be happening.
faq1
exactly. For example, NameVirtualHost *:80 must be used with VirtualHost *:80
namevirtualhost
namevirtualhost is http://httpd.apache.org/docs-2.0/mod/core.html#namevirtualhost or http://httpd.apache.org/docs/mod/core.html#namevirtualhost or
You must specify only one NameVirtualHost directive, hopefully with an IP address or a *. It says on which interfaces should Apache listen to name based vhosts requests, nothing more.
vhost examples
Look at these for examples http://wiki.apache.org/httpd/Recipes/ExampleVhosts :: http://httpd.apache.org/docs/2.2/vhosts/examples.html :: http://httpd.apache.org/docs-2.0/vhosts/examples.html :: http://httpd.apache.org/docs/vhosts/examples.html