homepage Welcome to WebmasterWorld Guest from 54.205.236.46
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe and Support WebmasterWorld
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Got Gotchas?
Jolting from 1.3.x to 2.x
Pfui




msg:4415253
 1:47 am on Feb 8, 2012 (gmt 0)

My old, trusty webserver suffered a catastrophic hardware failure today and my network/Linux geek spouse (I'm a web/Mac geek) will be restoring a 1.3.x BRU backup onto a 2.x tonight.

When 2.0 came out, http.config files changed, a lot, but I'm unsure what other upgrade-broken snafus I'll likely need to find, figure out, and fix ASAP.

If you've upgraded, do you recall some of the things you found out the hard way? Or might you have any tips you'd recommend now? From config recs to mod_rewrite and Perl tweaks, all thoughts appreciated, please. Thank you!

 

g1smd




msg:4415349
 9:04 am on Feb 8, 2012 (gmt 0)

I'm sure there are a few, but most people made the 1.3 to 2.x switch a year or two back and have likely forgotten most of the details. I know I have.

I can't recall seeing any major issues mentioned in this forum, but Jim mentioned a few things about the differences between 1.3 and 2.x at least a few times in the past.

Pfui




msg:4418116
 5:42 pm on Feb 15, 2012 (gmt 0)

1.) Well, nine days after our old Linux box died, we're still not back due to ongoing MAJOR snafus -- involving configs, Includes, permissions, missing files -- on the new machine, too many of which I remain at a head-banging loss how to fix.

GOTCHA Set #1 (Linux): A bad, bad restoration with nobody/nogroup permissions turning into account user/group, and massive numbers of files simply not restored (although they exist in backup). I'm still stepping my way through directory after directory trying to figure out what's missing, what needs re-restoring, and what else needs fixing/redoing, including scores and scores of crucial SymLinks.

GOTCHA Set #2 (Mac): Specific to my personal machine, I needed to update Fetch and Little Snitch to be able to access the new Linux box via FTP at all, plus re-set security Keys to be able to access the new box via ssh using Terminal. Each of these updates first involved literally hours of trying to figure out what was wrong, and at which end.

GOTCHA Set #3 (Apache): Broken things galore, from .htaccess Deny from lines for almost all Central and South American CIDRs (go figure) to mod_rewrite "exceeded the limit of 10 internal redirects" to "Options ExecCGI is off in this directory" and "unable to include "/dir/example.js" in parsed file" errors (permissions okay).

As of today, Set #1's still in progress. Set #2's done. Set #3's driving me round the bend because I've GOT to get my main site back up!

Speaking of...

2.) My main site, the one with Includes and CGIs and a forum and a Webinator and assorted doodads, has the problems. Includes do not work despite my putting everything Includes-related I could find (after re-re-rereading Apache docs and this forum's and other sites' posts) into its .htaccess and CGI script-running directories (cgi-bin and forum):

AddType text/x-server-parsed-html .html
AddType application/x-httpd-cgi .cgi
AddType application/x-httpd-cgi .pl
AddType text/html .shtml .html .htm
AddHandler server-parsed .shtml .html .htm
## Do not want Indexes: Options Indexes FollowSymLinks Includes
## Do I need the word "Includes" included so many times?
Options FollowSymLinks Includes
Options SymLinksIfOwnerMatch Includes
Options +ExecCGI
Options +Includes
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
## Is this config-level only?
AddOutputFilter INCLUDES .shtml .html

Because including all of those lines still isn't enough to enable Includes, I suspect there's a sites-available config problem, with the default and/or the main site (despite its Override All x2).

For example, when I test for a non-existent file in /cgi-bin on one of the handful of small sites also on the server (all working), I end up at the custom 404 error page -- for the main site!

So-o-o...

3.) Would it help any brave souls here if I included the default and one site-specific config file for your perusal, please? I reckon you'll spot right away what I'm missing/misunderstanding. Note: I do not have root access (not that I'd know what to do with it, other than really mess things up), so I can only test config changes in spurts. All that said --

Help, please? Here, or privately via Sticky or other e-mail, or phone, free or for a fee? Please? Thank you!

lucy24




msg:4419035
 2:51 am on Feb 18, 2012 (gmt 0)

GOTCHA Set #2 (Mac): Specific to my personal machine, I needed to update Fetch and Little Snitch to be able to access the new Linux box via FTP at all, plus re-set security Keys to be able to access the new box via ssh using Terminal. Each of these updates first involved literally hours of trying to figure out what was wrong, and at which end.

I hope you tried throwing yourself on the mercy of your Linux-speaking spouse. A while back, when I had to find a non-FTP way to get at my logs, and SFTP refused to play nice, I was briefly reduced to doing it in
:: pause to shudder horribly ::
Terminal. When I got to "Yes, but HOW?" the best and most intelligible instructions came from a Linux site.

(Fortunately the horror was not long-lived. I can now use SFTP with a GUI. Whew.)

GOTCHA Set #3 (Apache): Broken things galore, from .htaccess Deny from lines for almost all Central and South American CIDRs (go figure) to mod_rewrite "exceeded the limit of 10 internal redirects" to "Options ExecCGI is off in this directory" and "unable to include "/dir/example.js" in parsed file" errors (permissions okay).

Hey, I remember internal redirects. All I was trying to do was lock people out. Not redirect them anywhere, just slam the door in their faces. Turns out the [F] generates a secret request for a 403 message, and since my custom error documents have the very same .html extension as the files I'd been blocking people out from... you can finish this sentence yourself.

This is not easy to figure out when you don't have your own server, so setting the error logs to Debug isn't an option.

* * *
Is someone around here good at finding old threads and/or information elsewhere online? (Not me, for sure.) I'm thinking there's got to be a nice third-party list of Changes Between Apache Versions, with all the stuff they didn't bother to tell you. That includes things like "It may look like the identical command with the identical syntax, but it used to be a mod that ran before such-and-such other mod, and now it's Core and runs after everything."

Pfui




msg:4419865
 4:39 am on Feb 21, 2012 (gmt 0)

This is not easy to figure out when you don't have your own server

Lucy, this is not easy to figure out even when you do have your own server:)

For example, here's -- wait for it --

GOTCHA #4: SymLinks

I've got a score-plus of same-level post storage directories with very limited access.

In Apache 1.3, I created an "htaccess_MASTER" file one level up and symlinked each storage dir's .htaccess to the plain-text master. Nifty and quick; change the master and all dirs' files keep pace.

In 2.2, the symlinked per-dir .htaccess files don't work. The paths are correct, ditto user/group and permissions but the files do nothing. This is not good.

So is the prob that no one can symlink to .htccess files anymore? OR (more likely) am I running afoul of the same conf-related problem as the still not working Includes and ExecCGI problems mentioned above?

(And/or am I just talking to myself here?... Anyone? Anyone?... Bueller?)

Pfui




msg:4421388
 4:36 pm on Feb 24, 2012 (gmt 0)

EPILOGUE

My cluelessness about 2.2's configs not working vis-a-vis ExecCGI, Includes, and SymLinks (& my surprise, sadness, and increasing despair over the dearth of replies herein & elsewhere) resulted in this long-saga-short solution:

Procured yet another Linux box. Loaded slightly newer version of 1.3 onto it. Restored from backup. Tweaked dirs and permissions on compiled app (e.g., Webinator) files. Swapped out 2.2 box. FINIS

Only oddity w/ 'new' 1.3: Error logs now show the occasional "mod_rewrite's internal redirect status: 0/10" (which apparently is no big deal).

Thank you IncrediBILL, phranque, and Tomcat for touching base.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved