cancel
Showing results for 
Search instead for 
Did you mean: 

ccgi down

Tony_W
Grafter
Posts: 745
Registered: ‎11-08-2007

Re: ccgi down

Thanks David.
As my code behaved differently before the change, do you know what we were using before?
Tony
Ben_Brown
Grafter
Posts: 2,839
Registered: ‎13-06-2007

Re: ccgi down

We previously used a custom modified version of cgiwrap. It doesn't look like this is in current development.
One of our aims with the new platform is that everything will use standard debian packages, so when vulnerabilities are found in the software we're using (which is inevitable) we'll be able to upgrade it a lot easier than the old platform. As a result of this we should be able to keep the platform more secure and current going forward. As cgiwrap doesn't have a package in the current stable release of debian, we have gone with suexec instead.
Tony_W
Grafter
Posts: 745
Registered: ‎11-08-2007

Re: ccgi down

Quote from: Ben
We previously used a custom modified version of cgiwrap. It doesn't look like this is in current development.
... we have gone with suexec instead.

Thank you for the information.
I suspect that this will not just affect me. Reading between the lines, anyone with large/complex content-rich PHP pages, and those which reference other sites, will see blank pages for a long period until all of the content has been gathered and output. Then the whole page will be displayed at once - assuming that the browser has not timed out by then.
Tony
Gabe
Grafter
Posts: 767
Registered: ‎29-10-2008

Re: ccgi down

Quote from: Ben
We previously used a custom modified version of cgiwrap.

Quote
so when vulnerabilities are found in the software we're using (which is inevitable) we'll be able to upgrade it a lot easier than the old platform.

Roll_eyes
Hi Tony,
Unless I misunderstand the problem, it does look like mod deflate is blocking flush. Try:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
</head>
<body>
The page was<br>
<?php flush(); sleep(2); ?>
flushed with<br>
<?php flush(); sleep(2); ?>
success.<br>
</body>
</html>

Then flush your browser cache and add
SetEnv no-gzip dont-vary

to your .htaccess and try it again.
Gabe
Tony_W
Grafter
Posts: 745
Registered: ‎11-08-2007

Re: ccgi down

Hi Gabe,
Thank you - it worked. Smiley
I just added the line to the .htaccess, tried the original script and it operated exactly as it did before the ccgi update.
Thank you again, I can now go back to my real-time tracking.
Tony
Gabe
Grafter
Posts: 767
Registered: ‎29-10-2008

Re: ccgi down

Bingo.  Smiley
I think the same thing will work in a filesmatch if anyone wants mixed bahaviour
<FilesMatch \.php$>
    SetEnv no-gzip 1
</FilesMatch>

and similar.
Gabe
ninjanik
Newbie
Posts: 9
Registered: ‎03-08-2007

Re: ccgi down

Hi,
I've just noticed that our company web site is down. Looks like it may be our .htaccess file causing a problem since the ccgi server change over.
The site is accessable via the correct domain/page url (and any rewrites domain name & folder location occur corrrectly).
However the rewrite to the correct folder is not working correctly when using just the www.domain.co.uk.
I'm hoping someone could point me in the right direction please:
RewriteEngine On
# stop recursive looping
RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule .* - [R=301,L]
# append forward slash if not ending in dot something
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} ![^.]*\.[^.]+$
RewriteCond %{HTTP_HOST} (.+)
RewriteRule ^(.*) http://%1/$1/ [R=301,L]
# olddomain.co.uk
RewriteCond %{HTTP_HOST} ^olddomain.co.uk$ [nc]
RewriteRule ^(.*) http://www.mydomain.co.uk/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.olddomain.co.uk$ [nc]
RewriteRule ^(.*) http://www.mydomain.co.uk/$1 [R=301,L]
# olddomain.com
RewriteCond %{HTTP_HOST} ^olddomain.com$ [nc]
RewriteRule ^(.*) http://www.mydomain.co.uk/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.olddomain.com$ [nc]
RewriteRule ^(.*) http://www.mydomain.co.uk/$1 [R=301,L]
# mydomain.com
RewriteCond %{HTTP_HOST} ^mydomain.com$ [nc]
RewriteRule ^(.*) http://www.mydomain.co.uk/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.mydomain.com$ [nc]
RewriteRule ^(.*) http://www.mydomain.co.uk/$1 [R=301,L]
# www.mydomain.co.uk
RewriteCond %{HTTP_HOST} ^mydomain.co.uk$ [nc]
RewriteRule ^(.*) http://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.mydomain.co.uk$ [nc]
RewriteRule (.*) /mydomain/$1
# Prevent hot-linking of images etc
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.co.uk(/)?.*$     [NC]
RewriteCond %{HTTP_REFERER} !^http://(ccgi\.)?olddomain.plus.com(/)?.*$     [NC]
#RewriteRule \.(gif|jpg|js|css|swf|bmp|png|pdf)$ - [F,NC]
# Prevent .htaccess from being viewed
<Files .htaccess>
 order allow,deny
 deny from all
</Files>
cheers... Nick
Gabe
Grafter
Posts: 767
Registered: ‎29-10-2008

Re: ccgi down

Quote from: ninjanik
RewriteCond %{HTTP_HOST} ^www.mydomain.co.uk$ [nc]
RewriteRule (.*) /mydomain/$1

Looks like that would loop. You'd need another condition:
RewriteCond %{REQUEST_URI} !^/~username/mydomain/

See page 2 of this thread.
The idiosyncratic way the old server dealt with php meant that this would have terminated without the second condition, but only for .php requests.
Gabe
ninjanik
Newbie
Posts: 9
Registered: ‎03-08-2007

Re: ccgi down

@Gabe - Thanks very much for that.  Smiley
I had looked at this but didn't fully understand what was going on with the current htaccess file.
Pleased to say I've got it working correctly now... just need to look at why the content management system has stopped functioning.
mouseblack
Dabbler
Posts: 17
Thanks: 1
Registered: ‎17-03-2008

Re: ccgi down

there's a lot of talk about htaccess but I'm not sure my problem is that.
sure enough some wordpress installations had them and I believe I had an htaccess in the root directory to direct a www.mydomain.co.uk to it's folder in the cgi space but filezilla doesn't show any htaccess files whatsoever- have these all been deleted in the platform upgrade ?
so for every single folder on my cgi space I'm getting the 500 server error even though most of these folders were not associated with the root htaccess and I could navigate directly to them by entering: ccgi.username.force9.co.uk/myfolder/
any ideas ?
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: ccgi down

When you are using FileZilla have you selected Force showing hidden files on the Server menu? Hidden files are those starting with a dot - like .htaccess - and those are not visible unless the selection is made.
If anyone's .htaccess files had been deleted in the platform upgrade I'm sure it would have got a mention in this forum (mine weren't).
David
mouseblack
Dabbler
Posts: 17
Thanks: 1
Registered: ‎17-03-2008

Re: ccgi down

yep - got  Force showing hidden files enabled. And I FTP'd a test .htaccess to be sure
mouseblack
Dabbler
Posts: 17
Thanks: 1
Registered: ‎17-03-2008

Re: ccgi down

Yiphee !
I can now navigate directly to folders on my cgi space.
Now all I have to do is deal with an .htaccess redirect.
mouseblack
Dabbler
Posts: 17
Thanks: 1
Registered: ‎17-03-2008

Re: ccgi down

Can someone let me know what might be wrong with my .htaccess
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.534nm.co.uk$ [nc]
RewriteCond %{REQUEST_URI} !^/534/
RewriteRule (.*) /534/$1
permission is set to 640
I'm getting a 500 error even if I delete the Options +FollowSymlinks
Thanks
ninjanik
Newbie
Posts: 9
Registered: ‎03-08-2007

Re: ccgi down

Quote
RewriteCond %{HTTP_HOST} ^www.534nm.co.uk$ [nc]
RewriteCond %{REQUEST_URI} !^/534/
RewriteRule (.*) /534/$1

I think this should be:
RewriteCond %{HTTP_HOST} ^www.534nm.co.uk$ [nc]
RewriteCond %{REQUEST_URI} !^/~username/534/
RewriteRule (.*) /534/$1

Have a look at previous posts on page 2 and mine on this page - I had a similar issue (although mine was also looping)