Im using apache 223 on Debian I have a perl fastcgi script that apache calls but I want that script to run as
Gallery only offers widths that are at most as wide as the original image
uh-oh. I looks like port 80 is blocked, or not forwarded properly
Guy-: interestin
me?
you are familiar with portforwarding and starting the apache2 server
however, the copyrighttext mystery remains, I'm still working on it
yes, you.
who is fajita referring to.
don't mind her for now.
oh ok.
her? I always thought a fajita was an 'it'
no, it's definitely a girl.
call it her out of 'respect' xD
s/it/she's/
I'll take your word for it, but I can't help wondering how you tell, with a bot
does 'it' talk too much?
she
she is a thousand miles away
how rude some people are:-(
Guy-: us here have a close relationship
haha
anyhow
Hi thumbs
that was funny
since you seem to be using port 80, and that most ISPs block it, consider using another port.
har har
oh man
thumbs ;p
yeah
what?
thumbs, more of a love-hate relationship, eh?
3
any port?
any port is 4good. as long as it dosen't clash with a port in use
Hey, test
(am I alive?)
gman`: apparently, yes
sweet!
like sugar, baby
hush fajita
shush
huh?
hush
I have a dumb, but hopefully easy question regarding mod_rewrite… and I'll bet you get tons of those every day :$
gman`: you should ask it.
I'm trying to get *all* url requests in a directory to be sent to a php hosting file as a query
that's easy.
www.mysite.com/somedir/index.php?src=blah.jpg
but transparent, so the end user just sees the first URL
yeah, I can't seem to get it to work though
RewriteRule ^(.*) index.php?src=$1
(thats my current rewrite rule)
garbage
try putting junk in your htaccess file. If it's being read, you will get an Internal Server Error when accessing that resource.
gman`: make sure the htaccess file is being read first
yeah, its being read
I mean, when I request that URL
what happens is my PHP file reports back to me that $_GET['src'] = index.php
which just boggles my mind
can you give us a sample url?
and did you put RewriteEngine On in your htaccess file?
yes
sample as in for you to view?
yes
ok, hold on
did you see my last message thumbs ?
no
i think i changed my port to 8080, but now i get a router login page when i try to access my dns site from the other system on the remote LAN
your router is most likely using 8080 for administration purposes
try 81 instead
okay
never mind which port, just pass it!
wow that's really annoying
is the port specified in httpd.conf also, or just vhosts.conf?
that depends on your distro
ah, makes sense
i'll check both
ok
got it
http://www.phpleaders.com/cms/web/mm_travel_photo.jpg
gman`: it seems to work here
gman`: I see php code
Debug mode enabled…
right?
?
gman`: yes
fajita debian is the best!
….but 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/DebianLikePlatform…
:P
yeah, but if you scroll down, the $_GET is wrong
gman`: ok
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
rewriteloglevel
rewriteloglevel is http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewriteloglevel. RewriteLogLevel 9 is log everything…
with that url the $_GET['src'] should be "mm_travel_photo.jpg"
ze php, she scares me ;p
same luck with port 81
lol
it tried to resolve it to http://localip.copm:81/ but still no luck
…. .com?
yeah sorry fat fingers
is your server even listening on port 81 now?
not sure, all i did was forward the port for apache
you need to change the Listen directive, and restart apache.
do i need to restart apache each time i change the port :-/ lol
didn't even think of it til now
oh man, gotcha
hm, from the system running apache, firefox gives 'Not Found The requested URL / was not found on this server Apache Server at dave.homeip.net Port 80'
even though i though i changed all my directives to 81
what does the error log say, exactly?
for every rewrite rule, do I need a rewrite cond?
(error log is located..) :-/
gman`: in some cases.
defaout layout
sorry…
/var/log/apache2/error_log
what about in this scenario where I just want to redirect everything?
nothing of notable interest in the error_log
there's no real errors in the error_log
Good evening / Bonsoir
ugh, still no luck.
greetings
greetings user
it changed from 'The requested URL / was not found on this server.' to 'Firefox can't establish a connection to the server at dave.homeip.net.'
that probably means apache is not started
i've done 'apache2 -k restart' and checked the error_log and says 'resuming normal operations'
I'm sorry, I have to run
ask any other helper, they will give you a habd
no worries, thanks for everything.
make sure it is running, with "netstat -pntl"
is that command included in the apache2 command?
no
it is a linux shell command
oh duh, yeah
1 0.0.0.0:* LISTEN
so apache listens on port 81
are you testing it on port 81 ?
http://yourserverip:81
is the way to access it
thanks for trying to help me out earlier…turned out to be neither apache nor firewall issues, but conflicting static IPs on my network…take care
can i access the page from the browser within my LAN?
i'm getting a timed out error on remote windows system.
but i can see the page perfectly if i access it from my linux machine.
well davo http://laniptoserver:81
like http://192.168.0.3:81
hrmm, I'm having no luck with mod_rewrite for something that ought to be pretty simple
gman`, rewrites are never too simple..
lol
well…
I want http://www.phpleaders.com/cms/web/mm_travel_photo.jpg to rewrite to http://www.phpleaders.com/cms/web/index.php?src=mm_travel_photo.jpg
correct. that does work from the browser on the linux box, but not any remote system
Currently using "RewriteRule (.*) index.php?src=$1"
but the php file receives $_GET['src'] = "index.php", not "mm_travel_photo.jpg"
gman`: phpinfo() will likely show you which env var to use for the rewriten url
gman`: btw, you really dont want to do that,
why?
because
yeah that's a bad idea
why so?
looping
looping is http://rewrite.drbacchus.com/rewritewiki/Looping
gman`: your machine can get pwnt
ok, so what if I put in the rewrite an exemption for php files?
does work. Does this make sense?
also in your php you gotta becareful how you use that src variable
yeah, to avoid src=../../whatever_file_in_home_dir
gman`: not really
something else, related to looping?
gman`: you can put in http://someexploitedserver.co.communist/ownedlololol.php
Hi, I was in here a few days ago and had someone link me to a nice 2.2 or higher only solution to having apache have only one file serve all content for a virtual host or directory that didn't use mod_rewrite… but I lost the link. does anyone know what it was again ?
well it doesn't process the file
it just outputs contents
so it won't run any php code
1' works on my local system, is something mixed
http://wiki.apache.org/httpd/RewriteVirtualHandler
…..(oh that was bad)
^^ should have been 'http://dave.homeip.net:81/' works on my system
Action system will pass path info, right ?
You could presumably use ErrorDocument for that, but it wouldn't work for POST data.
DrBacchus, exactly
DrBacchus, I'm trying to store the bulk of my code outside of my document_root for security reasons
is it possible/normal that "PerlSetVar Foo" works inside Files, but "PerlSetVar Bar" doesn't?
how can i do to replace with apt-get the config files?
am i doing anything right with this DNS stuff?
this is a mf stuff apache2 doesn start
so question
RewriteCond %{REQUEST_URI} !^index\.php(.*)
RewriteRule (.*) index.php?src=$1 [L]
that should NOT be activated if the .htaccess file is in mysite.com/somedir/ — and the url is mysite.com/somedir/index.php?blah
davo dunno, what did you do ?
hi. need help with a caching issue. i generate thubnail images with php, and it happens that there is a new image with the exact same filename. now the brwoser only get the new image on manual reload. can someone point me to the right point to tweak to fix that ? it's rather unhandy as it is now
you can set a no-chache header, but it's up to the browser to honour that
naturally. what i don't really understand right now why it happens at all. from the server's point those are just plain images stored on the filesystem that change once in a while .. shouldn't the browser check if cached images are still current and get the answer that it changed from apache ?
erm.. no, HTTP doesn't work that way
I have a little problem with the server-status. It doesn't work in local but : "Allow from localhost" is in… Anyone have the solution ?
okay then .. mind to explain where i'm wrong ?
Questions of the form "what's wrong with …" can't be answered unless we know what you're trying to do.
it depends on the browser actually doing this check, and the default is to set some kind of expiry (ergo caching) for all content that's not marked as dynamic, so as to reduce bandwidth
so to have the browser even get the message that it should check more often, you'd have to set a non-standard header value
and even then, it's all up to the browser what it does with that information
tough cookies
Julia does it work anywhere else ?
okay … how can i set that header for a image file ? i know how to do that for a dynamic php page but never treid for a semi-static file
why would it be any different ?
I want it work with a Cacti script and normally it 403 Forbidden when i'm not in localhost
sorry i'm french
Julia what does the location block look like ? put it in a pastebin, not here
also,
also, is it the same person possibly
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).
I'm sorry Cacti take the IP of my server and not "localhost"… (The next time I read the #apache topic :p )
:-D
you also need to switch it to terse output specifically, for cacti to make use of it
byou also need to switch it to terse output specifically, for cacti to make use of it/b
Just a last question "Allow from localhost" If I want allow 3 hosts, what is the syntax ?
graphical plotted apache http goodness
noodl, using the Location/Action method you suggested, which I really like the sound of, I get the following error: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
Julia just insert more lines
Oh nice Ty for your help
let's see your config (and any htaccess files you might have, in case they're hiding rewrite rules) http://dpaste.com/
Very very well OH YEAH Have a nice day (I think :p)
I'm sure I have no rewrite rules at all
http://dpaste.com/hold/16068/
for the offending virtualhost, I'll go paste my main config
you don't have 'virtual' set, though i'm not sure if that'll help
without 'virtual', action only works for requests that match existent files
1' does not connect and http://dave.homeip.net doesn't connect from another system on the same
http://dpaste.com/16069/
noodl, I set virtual and I tried not setting virtual
davo how have you ensured that you can resolve the hostname locally to your internal IP ?
1/' on the linux box gives 'Firefox can't establish a connection to the server at
which linux box ?
noodl, adding virtual back makes the exact same result happen
the one i am on right now and trying to host the dns page.
"dns page" ?
well, i dunno the exact terminology.
well, better get crackin'!
i only have one linux system, and then a windows system on the same home LAN.
networking is a rather exact science
use dyndns's port forward option to be able to use port 80 from the outside
unless that's not possible on free accounts
Hi lads and lasses… Is there a module or something I'm missing? I'm trying to run som CGI apps in my cgi-bin, and I'm just getting the binary app data instead of apache running the file
I set chmod to 755 and I still just get the data. :/
nothign to do with FS perms
cgi
cgi is http://httpd.apache.org/docs/2.0/howto/cgi.html or http://wiki.apache.org/httpd/ScratchPad/EnablingCGI
hm, i have no idea. i didn't know doing a simple webpage from a DNS was such an undertaking…
go read the second link
errr
the cgi?
the cgi is !python, but that shouldn't matter
This page does not exist yet. You can create a new empty page, or use one of the page templates. Before creating the page, please check if a similar page already exists.
Useful link! ¬_¬
davo a simple webpage is indeed pretty simple, but the way you think it comes "from DNS" already indicates that you don't really understand the technologies involved
before, only AddHandler in vhost context. it's not surprising that it's looping.. do you now regex lookahead assertions?
indeed, i admit 100% i have no clue what i am doing, but i didn't think it was a crime to try.
1. outside DNS must resolve to your IP, 2. inside DNS must resolve to inside IP, and 3. you must have arranged the appropriate access to apache
by whatever means necessary
you seem to have covered 1., so you're stuck on 2.
which is odd, since most people would attempt to get hat working *first*
hm, i was able to do the first two until i switched apache from using port 80 to port 81, then all hell broke loose.
how did you switch apache, exactly ?
noodl, I don't know much if any about regexp
servertokens dave.homeip.net:81
Couldn't get a useful value for http://dave.homeip.net:81
in the 00_default_vhost.conf
changed all 80 values to 81
it looks like you have more problems than you thought, since 1. isn't working either
1 was working, until i changed 80 to 81
davo, try something in the 2800 range
so why did you do that, then ?
ok well the issue is perhaps that there's a loop happening because your handler matches your handler. i don't think Location (or LocationMatch) support negation, so you're left with using a *clears throat* negative zero-width lookahead assertion. see man perlre for the syntax, or shout and i'll look instead
ok well the issue is perhaps that there's a loop happening because your handler matches your handler. i don't think Location (or LocationMatch) support negation, so you're left with using a *clears throat* negative zero-width lookahead assertion. see man perlre for the syntax, or shout and i'll look instead
or, alternatively, get a decent ISP
someone here suggested changing 80 to 81 since perhaps my ISP wasn't allowing ports to forward on 80.
http://wiki.apache.org/httpd/RewriteVirtualHandler
my ISP isn't decent?
ok, i wrote that page, so if it's wrong then blame me
oh, okay
does anyone here live in the US and use Cox ISP (no jokes about the name, mind you)
davo if they don't allow you to run the services you want, then no, it's not a decent ISP
noodl, I think the rewrite one may work since index.php should be the only file in the document root, except of course for an occasional temp file…
but how can i be sure it's them that is not allowing me to run the services that i want, and not just me being a total n00b and not having a clue that i am doing it wrong.
try Action foo-bleh /script.php virtual // SetHandler foo-bleh outside of Location context (just in your vhost)
easy - switch it back to port 80, verify that your internet connection is forwarding the port to your server, and ask somebody to check
ok cool, i'll try that again
still gives error
okay cool, i can see my page on my local host
http://dave.homeip.net:81 works on my linux box
well, yes - but what does that prove
servertokens dave.homeip.net:81
Couldn't get a useful value for http://dave.homeip.net:81
but it doesn't work on the windows system
no it's http://dave.homeip.net:80 now
why would you expect it to ? I suggest you stop guessing and start applying the scientific method
test, verify, change, repeat
noodl, I think the re-write rules are best
they often are
noodl, without the rewrite_condition, they still work, too
what else do i need to verify?
i'm just off to bed but i'll try and verify that Action stuff tomorrow
noodl, okie, thanks
noodl, before you go
is it possible to use .. in a rewrite rule ?
uh, .. in a regex means two of anything
oh
aah, absolute paths work just fine
'cept LF
(.)(.) — with memory
norks have memory?
so the file name . means "match 0 or more characters except LF" ?
servertokens http://wootgnu.org/ondve/
Apache/2.2.4 (FreeBSD) PHP/5.2.3 with Suhosin-Patch mod_ssl/2.2.4 OpenSSL/0.9.8e
ehh
servertokens http://wootgnu.org/ondve/
phear
there
norks++
Apache in disguise
sporks++
mod_security for winxp
there are no norks! there is only.. SPORK
lol
duh
A child of five could understand this! Fetch me a child of five
I'll spork-feed your eyeballs to a child of five!
we need weirder factoids
spoon
Because it hurts more, idiot!
that's rather straightforward, 'spaz
child of five … interesting family life there
Hehe.
Hehe. is that the sort of thing mod_wombat/mod_lua will do too? hopefully with a less terse syntax?
you try digging out someone's heart with a spork. then tell me how straightforward it is…
it wasn't me - it was the bot ! (mimicks Will Smiths unendurable fakeness)
s/spork/spoon/
servertokens dave.homeip.net:80
Couldn't get a useful value for http://dave.homeip.net:80
servertokens aarcane.strangled.net
Apache
servertokens ichigo.aarcane.strangled.net
Couldn't get a useful value for http://ichigo.aarcane.strangled.net
hrrm
fajita must not have IPv6
excuse me?
ah so it's not just me
afais, fajita got your servertokens
servertokens aarcane.strangled.net
Apache
it just looks like you're borked.
megaspaz, but not for ichigo.aarcane.strangled.net
ya think ;P
ah missed the ichigo one…
ichigo is only accessible via ipv6
davo why not start by trying the steps you have been offered up til now ? do the port forward thing on dyndns, get your internal DNS figured out, and (optionally) set up iptables to pull things back to normal
aarcane so it's a different apache instance, then ?
not necessarily
adaptr, yeah, it's my internal testing server for working on stuff
the bind isn't done on vhost level, it can't be - it's done on the Listen
yeah
well mebbe not
namevirtualhost ipv6:80
i am trying as best i can to apply every step that i have been offered. i know i am not anywhere up to par with any of this, but i thought i am trying to learn from my mistakes.
namevirtualhost ipv4:80
and mebbe yes, trust an old TCP nerd on this
with different listen directives. i don't see why you'd need 2 apache instances running
you could set that, fine - but TCP doesn't care, it will bind to either or - and always to either or
i have the apache port fowarded in my router, but not sure how to do the portfoward thing on dyndns.
apache has no 'fluence on that
davo look around the settings for it
you should probably start trolling around the dyndns panel
"trolling" ? heh
okay fair enough, this troll can take a hint. thanks again everyone.
trolling == exploring
erm…
well in my context
not from my experience. but that's fine, i get the jist.
heh
anywho, thanks again.
btw, there is no dyndns channel
I call it "incontextinence"
he didn't say channel, he said panel - the web thingy you use
of course.
Hia ll, I think that my SSL configurations are wrong (phpinfo tell that the port used is 80 and the DocumentRoot is not the one that I set…) My site is hoste on my Personnal PC on an address located at dyndns.org. Anyone have an idea ?
not really, no - except that SSL usually uses port 443, not 80
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).
it said "You configured HTTPS(443) on the standard HTTP(80) port!" but In the config file I used the 443 port…
there are several places where you must configure the port
I put it only in the file /etc/apache2/vhosts.d/00_default_ssl_vhost.conf
ssl
ssl is *Secure Sockets Layer. Ask me about mod_ssl or ssl vhosts see also http://httpd.apache.org/docs/2.2/ssl/
finally someone doing exactly what i am hoping to do
hardly, unless you mean misconfiguring apache
you know what i mean ;p
well, no - your issue was DNS-cluelessness, and port problems - not configuring SSL
okay fine, anyways.
i was directing that towards metres, perhaps he might understand my situation.
and we don't ?
oh i am sure you do, all too well.
well, to be honest, I *dont'* exactly know what your situation is, because you haven't exactly made it easy to figure out
what way do you guys recommend to identify a 'leaking' apache process? it just eats up all system memory and all the swap, taking down the whole server remarkably.
tibyke most likely PHP, not apache
tibyke but you could strace apache or mod_php, or whatever you have running
adaptr, yep, sure, it must be php, but just cant identify it. apachetop and/or server-status doesnt help too much
its mod_php4 shared apache module
strace the initial apache process you mean?
if you have to, yes - although I don't know how much that'll tell you
im afraid not too much
you could log it and grep it for memory calls, see if something doesn't free()
i can try starting to disable each vhost one after another, and see what changes (for e.g. a couple of minutes)
actually, it's also very unlikely that mod_php causes leaks - it will be a script you are running
of course its a script, but thru mod php, it must be a user error of a php coder
eliminating vhosts may be the first step towards isolating it, of course
I'm using apache 2.2.3 on Debian. I have a perl fastcgi script that apache calls, but I want that script to run as a different user from what apache runs as. I've tried created a wrapper shell script that just has "sudo -H -u myOtherUser /path/to/fcgi_Script.pl", but that doesn't seem to be working. Can anyone suggest a better way?
okay, okay, i'll stick to that, thanks
is it related that I configured ServerName metres.homelinux.com:80 ?
do not put the port in the hostname.
thanks thumbs
however, that will not prevent apache from functioning properly
it's just a bad habit
now phpinfo told me that I used port443
that's an improvement.
Do the DocumentRoot define in the SSL section is useless ? when I type my address with https, does it supposed to use this directory ?
it will use the documentroot of your SSL vhost.
So i'm still having an error somewhere…
how so?
Hmm… strictly functionality-wise, is there any difference between Alias / /path/to/root and DocumentRoot /path/to/root?
no
however, Documentroot is required in a vhost.
it show me the http directory when using https…
faq1
exactly. For example, NameVirtualHost *:80 must be used with VirtualHost *:80
Really? I'm pretty sure that I've seen a bunch of vhosts without documentroots (that didn't give an error).
well for good measure.
it might work now without one.
using an alias is awkward either way
Yeah- I just switched them all, just making sure that I don't change anything
Hi all
All is not in today, pibefision
hey, is there some way to check for some sort of "flag" in a URL, and use a rewrite condition only if that flag is not present? - but strip it before say, a PHP script sees it?
(well, in a request_uri)
Apache using 280M+, is that normal?
it could be
Can someone help me? I'm having problems setting up an Apache2. I've created a new user, and wrote a directive on http.conf to a new dir, on that user domain /home/newuser/site/htdocs. All the files are owned by the new user, and my apache runs as apache user. I'm getting a permissions problem when i try to connect. (403). What must i do? make the user from the apache group???? how
what does the error log say, exactly?
403. Forbidden. Cannot read from that directory.
what does the error log say, exactly?
I've chmodded all the files and dirs to 755 also.
what does the error log say, exactly?
are you gonna ignore me one more time?
OK thumbs, let me see.
2 2007] [crit] [client 200.114.197.233] (13)Permission denied: /home/dezeos/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is
(13)
(13) indicates a file permissions problem. Make sure that Apache can read the file(s) and directories being accessed. See also http://wiki.apache.org/httpd//13PermissionDenied
^^
you rule, gonna check this. Thanks.
see, less guessing, more troubleshooting.
Tks. Finnaly solved. Whas a permission problem on the dir. Thanks THUMB!!!
no problemo
you around?
yep
would you be willing to give me some advice on how you got dyndns working on your personal pc?
no problem
if not, i understand
woudl you send me a msg pls?
have you got it ?
yes, have you got it too?
nope
i got your msg and replied 2 times
please try again
/join #MetresAndDavo
okay will do. thanks
how can i parce all html like php
?
all whatever.html like php document
with .htaccess
with .htaccess is it possible of limiting put, post, and delete in webdav?
hello
hola, roger_padactor.
i just started using ubuntu. i've used slackware before, and installed apache and all i want to be able to do is add and edit files in my www dir so i can start doing my web stuff. but it wont let me any ideas?
you need to set yourself a specifc goal.
php