Web Hosting Talk







View Full Version : htaccess file on raq


avara
05-29-2001, 04:48 PM
Whilst I can edit and upload .htaccess fine, they seem to cause an "internal server error" until I remove them. Am I right in assuming that the Cobalt RaQ 4 does not actually support these files, or am I doing something wrong here?

If the server does not support .htaccess files, is there another way I can have a custom page not found error page?

Thank you.

cheatman
05-29-2001, 05:13 PM
try enabling front page extensions.. worked for me

avara
05-29-2001, 05:37 PM
Cheatman, that didn't work at all. In fact, after enabling FrontPage, I couldn't even change the .htaccess file at all -- even after I disabled FrontPage access again!

The only way I could fix this was by telneting in as "admin" and typing "rm .htaccess".

FrontPage is the biggest joke I have ever seen.

Thanks for trying to help though. :)

adhytia
05-29-2001, 06:37 PM
It is not a good idea to use htaccess on Raq, is this condition is make your waranty void ???

If you a experimental workers, best to use PC Servers installed with red hat or debian.....

nowaday IBM has announce their new server called IBM x-servers...look it at www.dialtoneinternet.net

They have some promotional on this month, but the price is not good as cobalt Raq..:):)

Regards
Adhytia WS

cheatman
05-29-2001, 08:16 PM
.htaccess files are supported on the raq. If you telnet into your server and enter this command

locate .htaccess

it will list .htaccess files that the server uses..


Make sure you have your .htaccess file right. Here is what i have in mine

ErrorDocument 404 /404.html
ErrorDocument 403 /403.html
ErrorDocument 500 /500.html

/errornumber.html is the url of the page that i use to redirect it to.. could be something like /errors/404.shtml

Chicken
05-30-2001, 05:00 AM
Have you done any updates? The 4's had a problem in that they were shipped with a restriction set in httpd.conf that did not allow .htaccess files to work. The fix is simple, but I thought an update covered this. If you have updated, I'll post instructions on what *should* fix this.

Before you worry about that, try a simple .htaccess file to be sure it isn't working and that the error isn't in the .htaccess file itself.

ErrorDocument 404 /404.html

-is an easy one to test with:

Open NotePad.
Type this (only):
ErrorDocument 404 /404.html
Upload it in ASCII mode (very important!!!) to your web directory for the domain.
Create a HTML file called 404.html (put something in the HTML file like "This worked!").
Upload this into the web directory of the site as well (ASCII mode).

Test by calling a file that you know doesn't exist (jkhdj.html).

raylin
05-30-2001, 09:09 AM
If you have updated, I'll post instructions on what *should* fix this.


I have the same problem. I got an "Internal Server Error" page, too.

Case 1:
I uploaded an empty .htaccess.txt file to my /web directory and renamed it to .htaccess. I got an "Internal Server Error" page when I tried to browse my homepage.

Case 2:
I edited .htaccess.txt as you said:

ErrorDocument 404 /404.html

Then uploaded it and renamed it to .htaccess.
Also I uploaded 404.html to /web directory.
When I browsed my homepage, I got an "Internal Server Error" page.

Justin S
05-30-2001, 11:48 AM
I'm also having this problem. I've tried uploading a .htaccess file with the following...


ErrorDocument 404 /404.html


...and I still get an Internal Server Error. So I know it's not a problem with the .htaccess file.

avara
05-30-2001, 04:22 PM
Originally posted by Chicken
[B]Have you done any updates? The 4's had a problem in that they were shipped with a restriction set in httpd.conf that did not allow .htaccess files to work. The fix is simple, but I thought an update covered this. If you have updated, I'll post instructions on what *should* fix this.

I always keep my RaQ 4 updated with the latest packages (Cobalt sends me an email whenever there is an update).

I am also positive that I am uploading in ASCII mode.

Maybe my RaQ just doesn't like me -- never had any problems with non-Cobalt linux boxes.

avara
05-30-2001, 04:29 PM
Here's another interesting note:

If I upload a blank .htaccess file, my web site continues to work. Everything still works fine if I enter comments or random text. However, as soon as I actually enter a command like "ErrorDocument 404 /404.html", it just stops working and gives me an internal server error. And no, I didn't forget to upload a 404.html file.

Hyper Tech
05-30-2001, 08:08 PM
Sounds like a permissions problem. The RaQ4 problem mentioned in the earlier posts did not produce any error messages, all that was needed was to edit the line in srm.conf to say "AllowOverride All"
I would check the permissions and path to the .htpasswd file.
A typical .htaccess file on a RaQ looks like this:

# Access file
order allow,deny
allow from all
require valid-user
Authname DirectoryName
AuthPAM_Enabled off
Authtype Basic
AuthUserFile /home/sites/sitename/web/directory/.htpasswd

SI-Chris
05-31-2001, 02:48 AM
Here's how to fix the .htaccess problem on a RaQ4:

http://list.cobalt.com/pipermail/cobalt-security/2000-November/000966.html

Justin S
05-31-2001, 11:10 AM
I tried doing what the post Chris posted said, but it still didn't make .htaccess files work. Check this out though...


<Files ".ht*">
deny from all
</Files>


That was right after the AllowOverride section. Think maybe deleting that will make .htaccess files work?

Chicken
05-31-2001, 11:51 AM
Justin, you don't want to remove this, and what Chris posted should have done the trick, and was what I was talking about. The part you should change is immediately above that.

Reboot the beast and see if it works.

You could also try adding the site individually at the bottom of the file, but that is a pain to do everytime and this should do it (in theory).

Justin S
05-31-2001, 04:04 PM
While I hate to turn this thread into a "my server is still not working, help me" thread, I have to ask a question.

I changed my access.conf file to reflect the needed changes, and now it totally ignores .htaccess files (no more Internal Server Error). I remember reading about the solution to this before, but I can't find it now. Can anyone help?

avara
05-31-2001, 04:06 PM
Originally posted by IntelligentHosting.com
Here's how to fix the .htaccess problem on a RaQ4:

http://list.cobalt.com/pipermail/cobalt-security/2000-November/000966.html

That appears to do the trick. However, I fear it may allow users to get around CGIWrap, thus compromising security on the box. Please tell me I'm just being paranoid. :)

Chicken
05-31-2001, 09:56 PM
Well, when I first got my 4r, I was having the same problems. First internal server errors, drove me nuts. Then ignored...

I think at the time I had it set to allow > none and was putting every site at the bottom, which worked, then I changed it to allow > all and removed the crap at the bottom and it worked. haven't had problems in quite some time so maybe I'll look at the billion little text files I have on these things and see if I can find something...

raylin
06-01-2001, 01:12 PM
my access.conf is

.
.
.
<Directory /home/sites/>

# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".

# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.

Options Indexes FollowSymLinks Includes MultiViews

# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"

AllowOverride AuthConfig Indexes Limit

# ignore .ht*
<Files ".ht*">
deny from all
</Files>

.
.
.



All I need to do is changing line 52 from

AllowOverride AuthConfig Indexes Limit

to

AllowOverride All


right ?

Chicken
06-01-2001, 08:45 PM
##
## access.conf -- Apache HTTP server configuration file
##

# access.conf: Global access configuration
# Online docs at http://www.apache.org/

# This file defines server settings which affect which types of
services
# are allowed, and in what circumstances.

# Each directory to which Apache has access, can be configured with
respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).

# Originally by Rob McCool

# First, we configure the "default" to be a very restrictive set of
# permissions.

<Directory />
Options None
AllowOverride AuthConfig Indexes Limit
AuthFailDelay 2000000
</Directory>

# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.

# deal with symlinks in image directory
<Directory /usr/admserv/html/.cobalt/images/>
Options +SymLinksIfOwnerMatch
</Directory>

# This should be changed to whatever you set DocumentRoot to.

<Directory /home/sites/>

# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".

# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.

Options Indexes FollowSymLinks Includes MultiViews

# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options",
"FileInfo",
# "AuthConfig", and "Limit"

AllowOverride All

# ignore .ht*
<Files ".ht*">
deny from all
</Files>

# Controls who can get stuff from this server.

etc., etc., etc......

Chicken
06-01-2001, 08:47 PM
Then restart httpd

raylin
06-02-2001, 04:17 AM
It works!

Thanks, Chicken. :D :D :D

Chicken
06-02-2001, 05:33 PM
Whoooooo - hoooooooo! I remember how fustrating :angry: it was until I got to that point (it working) myself.

click2mo
06-08-2001, 02:41 AM
Hello,

I just got a raq4 server from rackshack.net several days ago, and I, too, have encountered this miserable .htaccess problem.

I know that I'll need to change "AllowOverride None" to "AllowOverride All"..but when i tried to save the file during the telnet sesion, the "permission was denied".

Okay, well, after i had edited that line, I hit "ctrl x", and then "y', and then the "enter" key..but I couldn't overwrite, (save) the file as access.conf. Why is that? How would i go about overwriting the previous access.conf with the edited version?

Please help. The techs over at rackshack online support don't seem to have hte answer, and hopefully someone can point me in the right direction.

P.S: I was really annoyed with this htaccess problem. I spent over two hours today researching and still haven't been able to find out how. Boy was i pissed. I should have spent that time studying for my finals. :(

Thanks in advanced.

Regards,
Kevin

Keeg
06-08-2001, 05:00 AM
you would need to be root to make those changes.
log in as admin the type su at the unix prompt it will ask you for your password type in your admin one again and you are root.
you can verify this by typing whoami at the prompt

Steve

huck
06-08-2001, 08:35 AM
Just a note. The last version of mod_gzip would break htaccess files on the Raq. I tried to write some rules to avoid this but never could get it to work. I think the problem might be that the .htaccess files got compressed and thus were not processed by the server, but I cannot be sure as did not do complete testing and debugging. (mod_gzip is a module that dynamically compresses content before sending it to the end user, this can save on bandwidth and download times.)