say, anyone know of an off-the-shelf perl script that does what apache's mod_index does, inclduing reading the configs?
c2perl mod_index.c?
/var/www/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
great.. now... why don't you listen to your web server?
jMCg, but i've set /var/www/htdocs as the document root
ok, i've figured out jMCg
I'm a genious.
jMCg, genius
pfft
hey jMCg
jMCg is very limp
Off for a shadowrun now
?
just waving my hand
!AddDefaultCharset
AddDefaultCharset?
AddDefaultCharset is http://httpd.apache.org/docs/2.2/mod/core.html#adddefaultcharset
can the suexecusergroup directive take uid rather then uname?
and if no to the uid, can the uname contain characters like .'s and -'s
suexecusergroup
suexecusergroup is http://httpd.apache.org/docs/2.2/mod/mod_suexec.html#suexecusergroup http://httpd.apache.org/docs/2.0/mod/mod_suexec.html#suexecusergroup
yeah looked there
doesnt mention
hello
what's up, phet.
is there any way to know if my apache is loading php?
check LoadModule lines or httpd -M
so it is loading php, but when I try to load a php file, it tells me the windows to save it
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
I have it loaded, it appears in apache2 -M
nico was a bit disappointed
ups
is there any sense that apache doesnt let me load test.php but it lets when the file is some.php ?
clear your browser cache
I have a problem with LUCENE , is this the right channel to ask about this ?
Hello !!
my redirect is acting strange
i did a regex match for 0-9
but it only works for everything except 2
oh nm it's a php problem, sorry :p
what's the best hosting way to do a moved redirect from one filename to another?
ideally without mod_rewrite
hmm does someone use mod_cband? ive set "CBandRemoteSpeed 150kB/s 3 4" but its loading between 5 and 50 KB/s :/ I dont gt it really
I have a problem with LUCENE , is this the right channel to ask about this ?
i already had it that way, Hajjar.
i need to saerch multiple terms by multiple fields
term1:field1 and term2:field2
how to build query??
how can i build a query to search a multiple terms in multiple fields?
plz any body help me..
can you help me please
Hey can you setup ACL or something similar for Virtualhosts ? EG i only want 192.168.0.0/24 to access these webpages??
allow from
see allow
allow
allow is http://httpd.apache.org/docs-2.0/mod/mod_access.html#allow or http://httpd.apache.org/docs/mod/mod_access.html#allow http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html
sweet thanks
is there a way that i can have error/access logs for userdir appear in the user's homedirectory?
you can do that with virtualhosts
with SetEnvIf and CustomLog with env-variable. but I guess that is bad idea, you spend filehandles and if user has write privileges to log file, it's a security risk
i want it just for the userdir's though
why is the user having write permissions on the log a bad thing?
http://httpd.apache.org/docs/2.2/misc/security_tips.html#serverroot
hi
last paragraph before server hosting side includes
access to /~phpbbtest denied . It is sited in my public_html and I have used another users/public_html so far and all of them worked fine
rather place them in some other directory and give user read privileges
check file permissions, pastebin 'namei -m /path/to/phpbbtest/public_html' output if needed
oh, i see
3
in theory it is not a permissions problem
well, depends on other directories in the path
check the namei output and pastebin it if needed
aaah... hmm could it be that the mod_cband , build for apache 2.0 makes these strange problems on my machine, because that has apache 2.2 running?
you need to rebuild the module for 2.2
everything is ok
the cases is I can't even access to the publi_html
would you like to pastebin the output?
the pastebin of namei?
yeah
another possibility is missing Directory section allowing access to that public_html
lamp, http://pastebin.ca/607253
namei -
namei -m
namei -m is your friend
the public_html's apache rules were made and they worked fine for other users
lamp, you are the boss
arghhhhhhhhhh
that is the problem drwx------ phpbbtest
nice, problem solved
thanks a lot
Morning,
When setting up Virtual Hosts, is it possible to do ServerName mysql.* so that if I go to any domain that points to my server, it will then go to /var/web_utils/phpmyadmin ?
serveralias
serveralias is http://httpd.apache.org/docs/2.2/mod/core.html#serveralias or http://httpd.apache.org/docs/1.3/mod/core.html#serveralias
^^
sweet :P thanks
Btw - is there a way with the sites-avaliable and sites-enabled directory to not have to restart Apache after every change?
no, every time you modify the config, you need to restart apache
apaachectl graceful
excuse me?
apachectl graceful
apachectl graceful is how you restart apache without dropping any client connections. Workers in keepalive will retain old config until they time out. Be patient, or set KeepAliveTimeout lower
^^
oh, so that's how web panels like cPanel do it?
maybe.
I don't use cpanel or those frontends
no, nor me
so I do apachectl restart instead of /etc/init.d/apache2 restart, correct?
default layout
Pop along to http://wiki.apache.org/httpd/DistrosDefaultLayout for an idea on where the main distros place Apache files.
you dstro mangled binary names and more config files all over the place
debian--
s/more/moved/
well, Ubuntu
Ubuntu is an ancient African word meaning 'I can't configure Debian'
hehe
it's the same thing.
true true
or rather, it's the same mess
hi, i'm running fedora 7 with selinux (enforcing), trying to get symlinks working i discovered that all dirs in the symlink target path have to have httpd_sys_content_t context, am i right? is there some other way to make apache serve symlinked pages?
turn off selinux
as, so /etc/init.d/apache2 graceful ?
thats exactly what i dont want to do
else, what's the problem just assign those attributes
apache has to get access SOMEHOW
ah, /etc/inti.d/apache2 restart graceful
yes, but when i create files in these dirs they inherit the context...
I hope you're not asking how to do X without allowing X, because a little thinking solves that soon enough
as you can see, all the binaries are renamed
these dirs doesnt contain web content only...
then that's your problem right there
web content dirs should conatin only that
why do you insist on using selinux?
well when is it installed and i think selinux is basically making redhat system
so it's 'making' the OS, so you have to run it?
funny
Don't flatter yourself. You're not funny.
shut UP
Shutting up.
I am too teh funny
reorganize your stuff, don't mix web content with files you don't want to serve
yes, thats why i want to use symlinks targeting to some dirs contained in svn repositories for example
"some" dirs ?
how about serving svn proper with mod_svn ?
svn has full access control
svn
svn is see subversion
subversion
subversion is a revision control system intended as an easy-to-use, fully-functional replacement for the Concurrent Versioning System (CVS); for more information, see http://subversion.tigris.org/ or join #svn on Freenode. For complex [authorization]
setups take a look at: http://www.debian-administration.org/articles/208 or http://svnbook.red-bean.com/nightly/en/index.html or http://svnbook.red-bean.com/nightly/en/svn.serverconfig.html
mod_svn, never heard of it, thanks
well
mod_svn
mod_svn is available for Apache 1.3
http://internetworkpro.org/pastebin/701
the module was not compiled properly
or against the wrong apxs
davixx your php cgi is fucked up
or for the wrong version of apache
why use it in the first place ?
it's noirmally teh crusty solution
thumbs, ok, trying to recompile mod_suphp
whu
adaptr, what you heard by "fucked up" ?
I heard nuffin
what version of apache are we dealing with here?
# apache2 -v
Apache/2.0.58
Jul 7 2007 15:37:05
your php cgi is fscked up
adaptr, ok... excuse me, apache 2.0.58 running with mod_suphp and php-4 cgi
Electrical conduits in machine room are melting.
davixx okay, all compiled from source by you ?
any reason why you don't use php5?
or mod_php
mod_php is see php
blame php
cgi is teh crusty
PHP should be presumed to be at fault until conclusively proven otherwise. And even thereafter, if it's convenient.
adaptr, gentoo
aaah
php under mod_php is a problem for me because php is not running with the users uid
"the users"
since you're using gentoo, do NOT use fancy flags
?
and it's your php that's crashing
#php
#php is thattaway. See the TOPIC for #apache!
still not
not is mandatory, but recomended
fajita forget not
I forgot not
smack adaptr
what?
heh she's loyal
or just female..
smack teh thumb0rz!
seen adaptr
7
thumbs, why are you thinking that i use fancy flags ?
niq is a bot too! now we can have little bot kids
because gentoo users like to do that in general
thumbs++
and it makes programs and libraries misbehave, most of the time
not to mention upgrading a pain in teh behind
well portage is quite good, actually
they invent flags at random
thumbs, it is not my case.
who are you calling a bot?
if not time consuming
many have duplikcates that DON'T do the same thing
*if time consuming
I didn't atttack you directly, in any case
thumbs, no problem
I've seen way too many apache install not work because some gentoo hacker 'customized' his package
niq is teh botz0r
seen adaptr
7
s/install/installss/
bah
humbug
I need a coffee
niq stop blaming me already!
I confess - I did everything, now SHUT UPZ0RZ !!11oneone11one
heh heh
hm
botsnack
okay gots to go - wanna new monitor
good evening
if it is a good evening, which niq doubts
hi folks, I'm having quite some trouble creating two vHosts on my Ubuntu Feisty System - Alle vHosts semm to be redirected to the dir of vHost1... how can that be? what would I have to write into /etc/hosts and /etcapache2/sites-available | confs can be viewed at http://djdz.de or http://stc-oh.de
what file(s) did you edit, exactly?
default vhost
The first-listed virtual host is always the default one when using name based virtual hosts. See http://www.onlamp.com/pub/a/apache/2004/01/08/apacheckbk.html for more details.
default layout
Pop along to http://wiki.apache.org/httpd/DistrosDefaultLayout for an idea on where the main distros place Apache files.
read all those
I used webmin to create the vHost entries, they show up in webmin but don't work through browsers... I read in forums that I should add domain entries in /etc/hosts, so I did for each host
now I ghet an overlap error
each hostname needs to resolve
what does the error log tell you, exactly?
does anyone knows of an apache mod, which collects per-vhost traffic statistics (available via url), and provides few variables (besides default ones) to be used in logformat (bytes sent/received including headers for example)
i had that module once before, but forgot its whereabouts ever since
added the error to http://djdz.de/error.shell
that generates a 404
what does the error log tell you, exactly?
w8... owner issue..
apc
Try using http://apache.pastebin.ca - It's a good pastebin, and is even set up to highlight Apache 'stuff'.
use that instead
now
now is the time for all good men to come to the aid of the ... oh, wait. now is now.
403
just use apache.pastebin.c
just use apache.pastebin.ca
great, now everything seems to be messed up
what is the most commonly used way of collecting vhost traffic stats, in terms of accounting?
RewriteEngine allowed on htaccess?
ok, then don't do anything about it
analysis
analog awstats webalizer visitors webtrax http-analyze awffull sawmill summary hitbox webtrends
^^
rewriteengine context
server config, virtual host, directory, .htaccess
rewriteengine override
RewriteEngine may be used in .htaccess files if AllowOverride is set to FileInfo
^^
thanks
Will the format be the same if it is in place in httpd.conf? I place my "RewriteEngine" rules inside a virtualhost
rewriteengine
rewriteengine is http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html#rewriteengine
but, using htaccess if you have access to the main config is not recommended
htaccess purpose
Don't confuse htaccess with password-protection. The purpose of htaccess is to enable users to configure apache locally for their own directories, when they have no privilege to do so in httpd.conf. Using htaccess slows the server. Also rewriterules and redirects are more complex in
htaccess
thumbs, http://djdz.de/error
thumbs, on my localhost i have access to my .conf, but not on a remote server
ok.
faq1
exactly. For example, NameVirtualHost *:80 must be used with VirtualHost *:80
^^
when using htaccess, remove the leaving slash (/) from your rewrite rules
everything else is the same
thumbs, ?
thumbs, is not redirecting correctly
faq1
exactly. For example, NameVirtualHost *:80 must be used with VirtualHost *:80
what does that tell you, exactly?
thumbs thanks
I guess I have no idea... something is not matching..
sure
fajita thanks too
it tells you that your virtualhost definitions have to match your namevirtualhost definition
so I suggest you make sure they match
botsnack
but I can't find a nameVirtualHost directive anywhere..
because debian splits up the config in 3w4978295872395823982375982579283578 files
default layout
Pop along to http://wiki.apache.org/httpd/DistrosDefaultLayout for an idea on where the main distros place Apache files.
look there ^^
debian--
thumbs, hm, my default just show a nameVirtualHost *, do now have to add a NameVirtualHost for each vHost?
like NameVirtualHost djdz.de
no. not like that.
how?
Servername djdz.de /VirtualHost
must match exactly
most people use *:80
for my otehr domain.. correct?
right
hellooooooooooooooooooooooo
ý am from turkey
ok.
how are you
debian--
not bad.
Hi, dont know if this is the right place to ask. When creting a certificate here: http://www.rapidssl.com/resources/csr/Apache2.htm I need to type a password ... and it says that I need to enter it when starting the webserver ...
its that really needed? that does not seem ease the use of the system ... if that password should be entered every time .. or am I missing something ?
is that correct or xx.xx.xxx.xxx:80?
sslpassphrasedialog
sslpassphrasedialog is http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslpassphrasedialog
tag.
also, don't use NameVirtualHost *
use *:80 instead.
tag must match what NameVirtualHost uses. that's the important thing.
it describes an interface, as in ipaddress:port - like *:80
block's ServerName directive.
http://djdz.de
thanks
what does the error log tell you, exactly?
you can only have one NameVirtualHost directive, by the way.
jpeg, http://djdz.de/error
I have only one afaik
you seemed to have defined VirtualHost djdz.de:80
don't
instead, use VirtualHost *:80
in djdz.de.conf?
wherever it's defined.
we've tried to tell you a few different ways.... this is getting old.
faq1
exactly. For example, NameVirtualHost *:80 must be used with VirtualHost *:80
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
you might want to read this as well
read that factoid a few times, carve it into your skin, tattoo it on your forehead, but just do it
you seem to be missing the point
I think I really am..
faq1
exactly. For example, NameVirtualHost *:80 must be used with VirtualHost *:80
oO no errors... w8
0 DO NOT
get it?
great 404
what does the error log tell you?
servername other.de /virtualHost
/etc/init.d/apache2 restart had no errors
what does the error log tell you?
LISTEN TO US
tail -10f error_log is your friend
1 2007] [error] [client 70.237.217.206] File does not exist:
9 2007] [error] [client 91.6.146.69] File does not exist:
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.
why /htdocs??
set the documentroot for your vhost properly
because it's set to /htdocs
I suspect you didn't read...
default layout
Pop along to http://wiki.apache.org/httpd/DistrosDefaultLayout for an idea on where the main distros place Apache files.
and missed a couple of existing files debian has
it is set correctly pointing to /var/www/djdz.de/htdocs
sigh
DEBIAN HAS DEFAULT VHOST FILES
you should read them, use them, or comment out their contents
Default VHost Config :: /etc/apache2/sites-available/default | that file originally said nothing But NameVirtualHost * | after editing it now says http://djdz.de/default
I don't get what you are trying to tell me..
there was nothing I could have commented out
also, /htdocs is the default docroot used by apache if not vhosts are defined
But how can they not be defined if they are defined in default just the way jpeg said it
perhaps you polluted httpd.conf or apache2.conf
never touched those two
i.e. set the servername, etc
I recommend you back up your whole config, scrap it, and reinstall the package.
Reinstalling won't help, because when w started with all of this it was a brand new install... including the rror
the default debian vhost doesn't just contain the namevirtualhost line.
yes, it will fix your issue
your config has major conflicts
you seem to be unable to fix it or listen to us, so this is what I recommende
hwt was the option again to delete everything --purge?
#debian
dpkg -P
or #ubuntu
#ubuntu is thataway -
ubuntu
ubuntu is an ancient African word meaning 'I can't configure Debian'
indeed
I can't even configure ubuntu... great
that sucks
well start with a clean config.
your current config is really messed up.
k, I'll do a reinstall... w8
-.- why does a apt-get remove apache2 leave all the files and drs in place?
#ubuntu
"purge"
because, for any distribution, config files are left where they are when removing a package
also, use aptitude and not apt-get
purge != remove
what's the point of asking about the "--purge" option, and then not use it?
allright... I'm gonna give up for now... I got guests and and don't wona be cursing around annoyed when they're sitting next to me ;-) GREAT THX for the advice guysand see you l8r
Good afternoon all
hi
privet, olol.
I've observed an issue that may be apache related or may be mod_perl related but it appears that when built on an x86_64 box, apache 1.3.37 processes consume significantly more memory
as compared to the exact same build and config on an i386 box
is there a known memory management issue there or a build argument I need to be using under x86_64?
This issue seems to have cropped up after upfrading from FC2 to FC4 so it may have some compiler related componant
can som1 help me with my vhost configuration in windows area??
you do know that 1.3 is several years old?
start by speaking english properly.
yes. If I could use 2.x I would
ok
anyhow, I do not run any 64 bit servers, so I did not witness your problem
did you compile it yourself?
yes
can someone here help me setting up vhost in apache?
ask
If you have an apache related question, please go ahead and ask it. We will not beat it out of you. We won't bite you either, at least until we get to know you better
any odd flags you might have used?
I've been doing this for many years. I didn't make any of the trivial build errors, although if there are special args for x86_64 that may not be fully documented, or something, I may have missed them
I've been doing this for many years. I didn't make any of the trivial build errors, although if there are special args for x86_64 that may not be fully documented, or something, I may have missed them
one sec
in any way, the mailing list might prove more useful, even even #httpd-dev
or #apache-dev, rather
we solely deal with compilation issues here, much less on 64bit architecture
you might find this factoid useful:
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
yo yo
thanks
http://pastebin.ca/607464
I'll pass it off to the mailing list. thanks
I don't see anything odd in there.
there isn't
it's quite a somple build
fedora had sketchy compilers bundled in some releases
same with the mod_perl build
yeah
I'm actually leaning in that direction
can you replicate it on another machine?
with another distro?
similar enough distro, I guess
in terms of gcc and glibc versions
I can replicate it on any FC box with distro above FC2
anyone know how with mod_rewrite I can make all request from http://www.site.com/images/ pull from /var/www/site.com/public/images/ ?
so any image that is called for will be grabbed from that dir
alias
alias is http://httpd.apache.org/docs/2.2/mod/mod_alias.html#alias
^^
ahh nice
thanks... I am newbs
no problem.
granny
Granny Weatherwax tells us the most important thing about magic is when _not_ to use it. The same is true of mod_rewrite.
it might too technical for this channel in any case. I'm sorry
yeah. thanks. I'll run it throuh the list
hey
fajita, alias
alias is http://httpd.apache.org/docs/2.2/mod/mod_alias.html#alias
( does someone know an alternative for traffic-limiting than mod_cband ? it seems this module does not work properly on apache 2.2
I want limit filedownloads etc to a certain bitrate
Anyone know why I would be getting "AliasMatch not allowed here" when putting "AliasMatch ^/icons(.*) /usr/local/apache/icons$1" at the top of my .htaccess file?
hmmm 64 mb for apache's log file is big, right?
is there a obvious reaon?
reason
not really
for one day of operation?
oh
lol
well, it depends what it's logging
http://apache.pastebin.ca/607497 Why my mod_rewrite and .htacess aren't working? Note: the allow override was all
what log level are you using?
let me check
knock it down to warn
hi
niihau, illegalc0de.
It is set to warn
omg
knock it down further
it has all POST action logged
what exactly is being loged?
oh
huh? That's not a warn behavior
i was wondering if anyone knew how or where to findut how to make my 2 computers have a dferent ip address on the net? i have 2 static ip addresses and i am running through a router.
is your app logging directly to the apache log?
find out^
your're right.. hmm
no
all requests are logged.. maybe the level is set in another conf file..
do you have multiple loglevel statements?
yeah
what you said
is your provider offering you two static IPs?
yes
I take it your router is doing NAT...
yep
what model of youter is it?
netgear DG834G v3
esentially, you'll want to configure your router to listen to both IPs and configure port forwarding for each IP to forward the relevent ports to each server
router
In order to access your web site behind a router, you must forward the port apache is listening on to your internal IP. Then you can access your site by pointing your browser to http://your external IP here:port. If your ISP blocks port 80, see 'port 80 redirection'.
Instructions on how to forward a port using most common routers can be found at http://portforward.com
aliasmatch override
I see a "CustomLog /var/log/apache2/access.log combined" statement. Should I change/remove it?
aliasmatch
aliasmatch is http://httpd.apache.org/docs-2.0/mod/mod_alias.html#aliasmatch or http://httpd.apache.org/docs/mod/mod_alias.html#aliasmatch
probably not
aliasmatch context
server config, virtual host
^^
fajita, customlog
customlog is http://httpd.apache.org/docs-2.0/mod/mod_log_config.html#customlog or http://httpd.apache.org/docs/mod/mod_log_config.html#customlog
customlog doesn't directly impact which requests are logged so much as what out of each request is logged
Please, http://apache.pastebin.ca/607497 Why my mod_rewrite and .htacess aren't working? Note: the allow override was all
garbage
try putting junk in your htaccess file. If it's being read, you will get an Internal Server Error when accessing that resource.
^^
Thank you for the help.
docs are always a good start
Ok, the file isn't being read at all... in httpd.conf mod rewrite is allowed... any idea about what to do?
directory /
is a filesystem directory, not a URL path. If you put options in this block, don't be surprised when whatever you're trying to do doesn't work.
set Allowoverride FileInfo on the proper directory
hillct, i got the static routs set up bit, it asks for destination ip address, ip subnet mask, gateway ip address and metric. do you know if this is the right bit and if so what to put in each? i have no idea what the subnet mask is for the net and im guessing the gateway would be the ip that
i want to have the computer on and the destination ip would be the computers internal ip. right?
what IP range is used in your network behind the router?
192.168.0.xxx
ok
subnet mask is 255.255.255.0
yep
metric is probably 1
ok
metric is equivelent to the hop count, more or less
t and if so what to put in each? i have no idea what
the subnet mask is for the net and im guessing the gateway would be the ip that i want to have the computer on
it's not static routes, but port forwarding that you need though
sorry, middle click
is correct. Sounds as though you may be editing the wrong area of the router config. You need port forwarding, not static routes
my router set up doesnt seam to have port forwarding
odd. most NAT aware routers do these days
seem that the dir had a typo
no matter what i do, it seems that my apache is spawning threads which take up the better part of my cpu, for a past where my cpu rarely went above 5%. how can i figure out what is causing this? ive tried rebooting, with no success
\o/ Error 500!!!
what does the error log say, exactly?
VPN Wizard, VPN Poli
I celebrated cause the error 500 was about the garbage... so... the mod_rewrite is working now
T-T finally
check services
then we'll look at advanced
docs paid off. I commented out the CustomLog lines and bye bye access.log
ok.
Name, Type (tcp,udp,tcp/udp), Start Port, Finnish Port
nothing to do with watching ips
that's for opening incoming ports though
Finish^
ok
lets look at advanced
have you lookup your router model at portforward.com?
portforward.com has guides for several router models
jpeg, no i dont know anything about this at the moment
try it
will do
WAN Setup, Dynamic DNS, LAN IP Setup, Remote Management, Static Routes, UPnP.
interesting site. Hadn't seen it before.
lan IP setup
had the same problem with apache 1.3.x ... upgraded to 2.2.x and the problem went away .... ( the cpu problem )
lets see if it lets you mange multiple external IPs
not all low end routers allow that
hillct, no thats all to do with the internal network ip settings
alas, i am allready rinning 2
brb im gona read portfarward.com
and now there is many little processes that gobbles up my cpu
and i know for a fact that there arent that many people looking at my server
disable some modules, and see what happens
ok it doesnt have anything that i can see about setting up multiple ips
hmmm, dont know then ... the problem I had would kill the server in matter of hours ... during the day ... at night it would take several hours since nobody uses it at night ..
it's possible that your router doesn't support management of multiple external IPs
not all low end routers do
I know there are some SonicWall products that do
my isp sent me that router when they offered me the package. so i thougt it would be able to.
I'm having some trouble with mod_rewrite. I'm trying to redirect requests from /~rigdern/cake/ to /~rigdern/cake/app/webroot/ (server URL)
so the first problem was that my rule created a filepath (/Users/rigdern/Sites/cake/app/webroot/). This file existed but apache gave a 404
network - where the linux box is also wired into the web server
you could use an alias
so I did a RewriteBase so that /Users/rigdern/Sites/cake became /~rigdern/cake When this was in affect, apache was able to find the file
However, with the rule I'm using, mod_rewrite reinjects my new URL due to the RewriteBase
and have the linux box do the work for the ips and just use the router for the wireless network
no i can't do that cause i have no modem lol
and it creates an infinite loop because the new URL is within the URL that the rule is applied to
use an alias instead
alias
alias is http://httpd.apache.org/docs/2.2/mod/mod_alias.html#alias
an alias might work for this
but I also have to apply a rule within to rewrite folders after index.php to URL parameters
so /x/y/z/index.php/some/args would become /x/y/z/index.php?arg1=some&arg2=args
which an alias wouldn't work for
and I think I would still need the RewriteBase and end up with an infinite loop
rewritecond
rewritecond is http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewritecond
use that.
see this page for examples
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
I skimmed through the RewriteCond documentation already and I didn't see anything
can you be more specific as to which part would be useful to me?
which version of apache are you using?
1.3
1.3 is the 1998 release of apache. Do you use Windows 98? Slackware 4? Redhat 5?
Mac OS X
Mac OS X is +a unix. Unix filesystems are case sensitive
yeah, and mac os x filesystems aren't
there's some wierdness with that in the apple apache config
what was the exact error that you got when you did the rewrite to the filesystem path?
verbatim
Verbatim means "word for word" "copy and paste". It means we want the exact error message from the error log. That also means use a pastebin for 3 lines. Ask me about 'apc' for which pastebin to use.
1 second
File does not exist: /Library/WebServer/Documents/Users/rigdern/Sites/cake/app/webroot/
that's not the complete line
however, it's probably true
5 2007] [error] [client 192.168.1.103] File does not exist:
that's not the path I expected. in the browser it just said /Users/rigdern/Sites/cake/app/webroot/ was not found
browser error messages are useless
always look in the error log
yea, I'll keep that in mind
so it was putting it under you docroot
what rewriterule was that? and in what context? (server, directory, .htaccess)
what do you mean by directory?
inside directory
brb just doing a router upgrade
directive
yea, directory then
ah, ok, then it gets rewritten with rewritebase
mod_rewrite acts completely differently in directory context than in server context
if you want to rewrite in directory context to an absolute filepath, you need to put a / in the substitution
rewriterule relative/to/directory /absolute/filesystem/path
well i think the only diff is that the old target doesn't understand the / url path
no, it also uses rewritebase
mod_rewrite
mod_rewrite is http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html or http://httpd.apache.org/docs/mod/mod_rewrite.html or see http://rewrite.drbacchus.com/
ok yeah, rewritebase
which you don't actually have to use either
no, but it makes a difference
look at the chart near the bottom of that page
"Inside per-directory configuration"
in particular the difference betwee
^localpath(.*) otherpath$1
and
^localpath(.*) /otherpath$1
note that in case 1, rewritebase was prepended, and in case 2 it wasn't
rewriterule (.*) $1 in directory context,
it prepends rewrite base
rewriterule (.*) /$1
it doesn't, although that's probably not what he wants either
probably:
rewriterule (.*) /place/where/to/find/$1
RewriteRule (.*) app/webroot/$1 [L]
RewriteRule (.*) /Users/rigdern/Sites/cake/app/webroot/$1 [L]
but it's still prepending the DocumentRoot
it shouldn't do that
of course, you are using 1.3
this is expected in 1.3?
i wonder if that makes a difference
i don't remember, it's been aeons
1.3 is so last tuesday
according to the docs, it should work the same in 1.3
should being the operative word
yeah
should?
should is ="please do this; it's not required, but it makes life better"
no, fajita, should is who bloody knows?
You have no access to change factoids
just as well
like an isp should be able to keep their service up and running and not have outages every week
comcast--
ouch
did you try enabling rewriterule?
argh
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 it give you any wierdness with that rewriterule?
it's enabled, let me check what it said
always good
rewriteloglevel
rewriteloglevel is http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewriteloglevel. RewriteLogLevel 9 is log everything...
I don't see anything odd and it's at level 9
internal redirect with /Users/rigdern/Sites/cake/app/webroot/ [INTERNAL REDIRECT]
that's after the rule is applied
that's ugly
[ns]
[ns] is No Subrequesta rewrite flagee mod_rewrite
then what?
then it shows some pattern I didn't write
(3) applying pattern '.*' to uri '/Users/rigdern/Sites/cake/app/webroot/'
not-matched
(1) pass through /Users/rigdern/Sites/cake/app/webroot/
and then it goes on to the favicon so it's done processing my URL
and your rewriterule does not have [R] or [PT]?
it was exactly as you wrote it above?
greetings. Can I put comments in a .htaccess file? If so, what is the format to use?
# hi, i'm a comment. ignore me.
it was exactly what I pasted
wierd
can you pastebin the entire rewritelog for that request?
like, empty your rewritelog file and try the request
yea
brb
http://apache.pastebin.ca/607575
there's actually a second rule which is almost the same. It does the redirect when a specific file in cake is not specified
I put it in the paste
well, that's yukky
I tried making a symbolic link to Users in /Library/WebServer/Documents but I still get the 404
does the error log complain about symlinks?
rewriterule (.*) app/webroot/$1 [L]
well that's odd, now the symlink worked
browser cache
Browser caches can be very persistent. Restarting the browser, or even rebooting, will not necessarily clear the cache. You must expressly clear the cache via the menus.
you told me I should put an absolute path there
in the rules
i didn't realize the path was inside your directory
context
i'm pretty sure you said it was in server context, but perhaps i misunderstood
sorry
You will be!!
ok
points too?
hillct, no my router does not suport more than one ip address
bummer. Gotta get a new one
any good ones?
netgear dont do any that i can use with one phone line
the issue is not quite resolved
Hi, what could be a reason for my .htaccess file to be ignored by Apache2? If I change the main configuration file changes work. Server root is /var/www/ I have .htaccess in /var/www/html/work2/.htaccess Apache completely ignores it and there is not a single message in the error.log. What
could be the problem?
AllowOverride at httpd.apache.org/docs
allowoverride
AllowOverride tells Apache what things you wish to permit in .htaccess files. See http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride
Thank you.
test
Rigdern, there is #test FYI
Thanks a lot for help. Got it working.
for some reason, all of my messages in #apache weren't showing up (but they did in #test)
eh?
excuse
Satan did it
lol
yeah, that satan...
dern troublemaker
/Users/rigdern/Sites/cake and /~rigdern/Sites are now both valid URL's
satan++
and when the rewrite rule is applied, all of my scripts get /Users/rigdern/Sites/cake as the URL
mmm, cake!
Can I eat the adaptr now?
so when they try to get images and css files using the full path, the print /Users/rigdern/Sites/cake instead of the /~rigdern/cake
so they are printing the filepath instead of the URL
is it possible to password protect a directory listing, but not the files themselves?
and when /Users/rigdern/Site/cake is requested, the rewrite rule doesn't occur so my images and other resources aren't being found
and I'm going to need my cake back
scope
section, or a Location, perhaps. or http://httpd.apache.org/docs/configuring.html#scope or http://httpd.apache.org/docs/2.2/configuring.html#scope
well I'm actually confused between URL's and filepaths
if I type a URL into my browser and it's not found, apache says The requested URL /~rigdern/blah was not found on this server.
If I type a URL into my browser that gets rewritten and can't be found, apache says The requested URL /Users/rigdern/Sites/cake/app/webroot/blah was not found on this server.
notice the first error gives a URL and the second one gives a filepath
I would think that all 404 errors should spit out a URL and not a filepath
nope. They're both URLs. That's what's wrong: the second one doesn't map to a filepath
(at a guess; I didn't see your original problem)
Will sir have chillies and garlic with that
yes
/Users/rigdern/Sites/cake/ is the path in my file system
/~rigdern/cake/ is the path I'd type into my web browser
they are both URL's?
can we see your config? sorry if you've pasted it already
aaargh!
quick! More boiling oil
aha, that'll be for the noodls. mmm
http://apache.pastebin.ca/607611
seeing a full filesystem path when using mod_rewrite in conjunction with mod_rewrite is typically an indication that mod_rewrite got confused about its base uri and lumped for r-filename indead.
wtf are you trying to do with rewriterules?
I'm trying to change /~rigdern/cake/ to /~rigedrn/cake/app/webroot/
that's the first 1
the second one is basically the same
cake-- rails done badly in every way
/~rigdern/cake/somefile to /~rigdern/cake/app/webroot/somefile
the first one's redundant, and you don't have a RewriteBase /~you/
better with documentroot or alias
if I RewriteBase, it'll turn into an infinite loop
granny
Granny Weatherwax tells us the most important thing about magic is when _not_ to use it. The same is true of mod_rewrite.
alright, so I'll look at alias
but there's still a couple of rules have to use mod_rewrite which I haven't put into the config file yet
so I'm wondering if these will result in an infinite loop as well
you're fighting a losing battle by trying to use an ancient version of apache with mod_userdir (on mac os x which has extra wierdness iirc) and mod_rewrite. let alone mod_php.. at least you're not using htaccess files, i guess.
still, sounds like a fun battle
I didn't realize it was such a big battle
noodl is a knight in shining armour and will fight your battle
voodoo
see mod_rewrite
wait for the next version of mac os x. you'll have a modern version of apache, and rails, not some crappy php knockoff
I know what this rule is supposed to do but I don't understand how it works yet. I'm just wondering if it might result in an infinite loop like the other one
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
that'll could end up looping. i'd try adding RewriteCond %{REQUEST_URI} !index.php
shouldn't be necessary but in your case it might help
lol, alright
thanks for the help
rewriterules are for looping!
excuse?
The vendor put the bug there.
my thing i am compiling requires apxs .....it needs apache 2 but i dont think it realizes it is now apxs2
can i just rename it ?
your destribution renamed apxs
blame debian
as usual
debian--
can i jus rename the exe ?
karma debian?
debian has karma of -243
i would ln -s it, rather than renaing it
or better, use "--with-apxs" as a ./configure switch
if it exists
can anyone tell me where I can read some documentation that explains how httpd processes get launched and are maintained? I've got 21 httpd's running, and that just seems like too many
minspareservers
minspareservers is Ahttp://httpd.apache.org/docs-2.0/mod/prefork.html#minspareservers
that URL, and related
thanks!
and generally
performance tuning
performance tuning is http://httpd.apache.org/docs/2.2/misc/perf-tuning.html
so, am i correct in assuming that i have 21 processes because at some point all 21 were active? and apache launched them to handle the load?
probably
probably is the same as 'definitely not' when dealing with important or critical applications - if you're not sure, don't let 'probably' suffice
what mpm are you using?
rici, sorry for being ignorant, but what's "mpm"?
mpm
mpm is http://httpd.apache.org/docs/2.2/mpm.html or Multi-Processing Modules or sexyhandyhandy
I'm on linux, so it looks like prefork is the default
just do httpd -V
jpeg, ok, yep, prefork
are you familiar with the config file at all? you'll find these parameters within...
jpeg, I know enough to get a site up and running, but I fall short in the performance tuning side of the config
forgive me for saying so, but it sounds like your sites aren't busy enough to require performance tuning then.
in any case, the parameters are pretty in your face in the config file...
you can't miss 'em
jpeg, that's probably true, i'm just trying to figure out why i've got all of these memory-hogging httpd's running when they seem unecessary ... they're pushing me into swap memory and the performance hit is noticable
you can try to lower Min/MaxSpareServers
but not too much
and maybe MaxClients
yeah ... the other answer may simply be that i need more RAM ... 512MB probably is too little
worker MPM is much more memory-efficient
even if it wasnt by itself, it would be because it excludes php
blame php
PHP should be presumed to be at fault until conclusively proven otherwise. And even thereafter, if it's convenient.
yeah, 21 processes isn't that many
rici, ok, that's good to know
21 would be a lot if you had just 4Mb RAM
(as my first apache box had)
well, yeah.
Could not reliably determine the server's fully qualified domain name, using cain.homr.net for ServerName mean i need a PTR record for it to work correctly?
servername
servername is http://httpd.apache.org/docs-2.0/mod/core.html#servername or http://httpd.apache.org/docs/mod/core.html#servername
my 21 apache's are taking about 80M, i think
maybe less
I have javascript installed on my computer. If I type "js -f hello.js" then "hello, world" appears. I would like to have this hello file run as a cgi script. Is there a very easy way to do this?
I don't think there is a way to use a shebang line in a JavaScript file
I have a NameVirtualHost vhost answering *:80 at www.domain.com and another vhost answering at ip:80. When I go to http://www.domain.com I get the one answering on the ip. I'd really like the ip-based one to only answer if it's actually the host sent
across
I think that's what __DEFAULT__ is for
ditch the ip based one, make it the first loaded vhost instead.
like supaplex said, it'll be the default vhost and respond to ip requests, and it'll be respond to named requests as well
jpeg/supaplex: thanks
why can't you use a shebang line in javascript?
does it not ignore it?
if you're using spidermonkey, it works fine. at least
wfm
Works For Me
jpeg/Supaplex: yeah, got the apache config working like I wanted now. Thanks.
rici I didn't think # would be a valid first character. I'll try!
it's not documented anywhere, but then that's not a surprise
amazing. It works!
always good to just give these things a try
thanks
hi how do you change the server name in apache2.2
I can't find the direcitve in any of the files
servername
servername is http://httpd.apache.org/docs-2.0/mod/core.html#servername or http://httpd.apache.org/docs/mod/core.html#servername
serveralias
serveralias is http://httpd.apache.org/docs/2.2/mod/core.html#serveralias or http://httpd.apache.org/docs/1.3/mod/core.html#serveralias
thnx
I'm sorry I still need help
I don't think I understan
I get this error
* Forcing reload of apache 2.0 web server... apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
6 2007] [warn] NameVirtualHost *:0 has no
Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
6 2007] [warn] NameVirtualHost *:0 has no
fqdn
fqdn is http://wiki.apache.org/httpd/CouldNotDetermineServerName
common misocnfigurations
common misconfigurations
common misconfigurations is http://wiki.apache.org/httpd/CommonMisconfigurations
the first link for the first warning. the common misconfiguration for the second one. look at the mixing * and non* ports
yes thnx
I think its a debian thing
because I'm getting arestricted access in my browser
error log
Look for the ErrorLog directive in your configuration file. Common locations include /var/log/apache/error_log, /var/log/httpd/error_log, /usr/local/apache/logs/error_log, and "C:/Program Files/Apache Software Foundation/Apache/[version]/logs/error.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).
thanx a lot but I have to go
*shrugs*
I'll get back if I get stuck again
Is there some weird interaction between the ServerAlias and Proxy directives such that requests using the host name specified with ServerAlias don't get proxied?
no
but it seems unlikely to me that you really want to use a proxy directive
Hmmm.
Hmmm. is ,you wanting apache2 with php mysql perl, etc
unless you mean proxypass or [P] in a rewriterule
Er, yeah, ProxyPass
Is there a good place to paste for this channel?
then there's no wierd interaction. the problem is elsewhere
apc
Try using http://apache.pastebin.ca - It's a good pastebin, and is even set up to highlight Apache 'stuff'.
http://apache.pastebin.ca/607892
hi
When I request a url with www.codersatwork.com it works fine; when I request via codersatwork.com it falls back to the default site.
any people speak spanish
error log?
When I had the same basic config file but serving the site statically, both hostnames worked.
ServerAlias maybe?
Let me check.
where i can find apache-1.3.x.tar.gz
namevirtualhost * might give apache a better hint, assuming some other virtualhosts exist that aren't in the paste?
I finally got it to work. thanks for the help before
congrats
rici, you can help me?
you mean instead of VirtualHost * ?
do not pm without asking for permission
in addition to -- they go together -- Read the documentation for name based virtualhosts
el hecho es que tengo que irme.
hmmm, which error log should I look in. There's nothing in the codersatwork error log which makes sense since it's apparently not being handled by that virtual host.
talvez hay alguien en #apache-es
rici hablas español?
solo necesito na cosa
de donde saco el paquete para compilar el apache en mi unix
como se dice STFW?
http://httpd.apache.org/download.cgi
hmmm, the other virtual hosts on that machine, which are configured about the same way, work as I'd expect. The only difference is they aren't proxied.
gracias
de nada
muy amable
jpeg, que version instalo?
2.2.4
2.2.4 is recommended
ok
voy a probar de compilarlo
conocen alguna guia de instalcion actualizada?
todas hacen referencia a la version 1.3
there is a readme for 2.2, there is an INSTALL and README in the tar
apache2.conf Includes /etc/apache2/conf.d/ which contains virtual.conf which has NameVirtualHost *
So that should be set, right?
plus ./configure --help, kTnU
it's easy
ok, pense q debia compilar todo junto
apache, php y mysql
http://httpd.apache.org/docs/2.2/install.html
apache first, then php then mysql
bbiab
thank toy
you
What, me??
hi
what's up, nulb.
if i put ngnix to my ipv6 enabled box can it work as a gw to access my ipv4 server?
Hmmm. If I remove the default virtual host, all is well. But I'm still not clear why it worked when the site wasn't proxied.
jpeg
jpeg is gonna be down this weekend... you up for lunch on saturday?
I want to start and stop apache2 on Ubuntu, but it says that I have to install apache (apachectl -k graceful ) , when I already have the package apache2.Man, its a lot easier on Windows.
i can pm you?
cmon
Is there an easy way to start and stop apache2 on Ubuntu? I found "apachectl -k graceful", but I get the message, "The program 'apachectl' is currently not installed. You can install it by typing sudo apt-get install apache"
sudo /etc/init.d/apache2 restart
unlink, Thanks a lot. How can I just stop it? Like this, "sudo /etc/init.d/apache2 restart" ?
stop
HAMMERTIME!
sudo /etc/init.d/apache2 stop
all services are started/stopped in that manner
if you prefer, you can use invoke-rc.d
unlink, Okay, thanks for your help. I just found "* Usage: /etc/init.d/apache2 {start|stop|restart|reload|force-reload}"
sudo invoke-rc.d service-name command, where service name is something like apache2
my app requires apsx
apsx
but in debian its apxs
can i jus rename it ?
probably not.
in fact, I'd check to make sure it runs on apache2.x
jpeg
jpeg is gonna be down this weekend... you up for lunch on saturday?
i can pm you?
why?
more people can help here
one question
ok.
anyone mind taking a quick look at the apache conf at the bottom of http://antony.lesuisse.org/qweb/trac/wiki/AjaxTerm mine is similar, but proxypass fails... any ideas? thanks
no error, it just does not kick in at all... the modules are loaded
jpeg, i am sorry i mean its apxs2 in debian debian people renamed it
it tries to load an html file at the usual url instead of redirecting
I guess you could try then *shrug*
lol ?
how od you rename file via CL ?
anyone here know the command ?
mv apxs apxs2
mv oldname newname
i posted my config at http://rafb.net/p/AUKXO051.txt
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).
step zero
step zero is to insert a Linux or BSD CD
rofl
step sevem
step seven
... wait, how the hell did you get to step seven
;x
lol ..
step 3
step 3 is one thing
do 'em in order
lol?
step 2
step 2 is scream and run
lol.
step 3
step 3 is one thing
step 4
step 4 is another
step 5
step 5 is iwhere it should stop but it keeps going for 29 more steps and the result is garbage. why is it doing that
step 6
step 7
the words, not numbers
ah
step sex
erm...
step six
step six is goto step one
step seven
... wait, how the hell did you get to step seven
step five
step five is a well kept secret
step six
step six is goto step one
step seven
... wait, how the hell did you get to step seven
lol?
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).
3 whoever wrote fajita
step two
See step one. For the clue-impaired, that's ERROR log, not ACCESS log
step three
step three is to blame anyone who tries to help
lol.
step four
step four is PANIC
step five
step five is a well kept secret
step six
step six is goto step one
step seven
... wait, how the hell did you get to step seven
step eight
you fell off the edge of the world
o0
step nine
Exactly how many steps do you need to get to your errorlog
step ten
rm -rf /
ROFL.
step eleven
heh. I didn't even know those were in there.
lol
step zero
step zero is to insert a Linux or BSD CD
heh
ubuntu
ubuntu is an ancient African word meaning 'I can't configure Debian'
step eleven is replythats sudo rm -rf / for those of you who speek debanese
i haven't a clue
no, step eleven is replythats sudo rm -rf / for those of you who speek debanese
no idea, immute
debian
debian is "we complicate it for you so you don't have to" or see /usr/share/doc/apache*/README.Debian* or http://wiki.apache.org/httpd/Platform/DebianLike
redhat
sorry...
perl
Check out #perl or http://www.perlmonks.org. To test a perl script, use \\ at a shell prompt. DO NOT use "perl scriptname.pl" as, that will mask shebang errors. .
fedora core
try turning off selinux first
lol
apache
apache is the wrong tool for that.
lol?
o.O
Poke!
;o
anyway
kudos to who wrote the source to anything fajita replies to ;o
it's pretty much a community effort, or was until recently
right
she's been migrated to another engine recently
whats the base wrote in? do you know?
or rather what is it itself
she used to be programmable by everyone, but someone added ACLs
heh, cant ctcp without registering
and ive been too lazy for the past 3 months to register
;o
she was an infobot until this year, now she's a "flooterbuck" or "flootersomething"
i see
who do I need to talk to to get acces to modify/add stuff to fajita?
pctony
pctony is a loser (see his blog for details)
lol...
fajita++
karma fajita
fajita has karma of 194
anyone mind taking a quick look for me? i'm pretty stumped
add me to fajita's ACL, please?
pctony's a brit, probably asleep atm. I'll talk to him, imMute
ah, okay. figured he'd see that in the away log anyway
oh. maybe
http://init.zool.se/mpinfo?view_log=1
I've followed the manual orthodoxly
how cna i use apxs to see if mod python is installed ?
-
don't use apxs for that. use httpd -M
httpd -M
httpd -M lists both statically and dynamically loaded modules for apache version 2.2 and higher
http://init.zool.se/mpinfo
jpeg, im not using it this damn configure script is
some_other_page.php
fajita, you speak spanish?
wish i knew
fajita, you speak spanish?
no idea, ktnu
haha ok, no problem
bot
I am a bot. I am not a sentient being. I cannot hold intelligent conversations.