Help: Apache .htaccess on Solaris 2.6 not working

Help: Apache .htaccess on Solaris 2.6 not working

Post by Gregor Pipa » Sat, 11 Jul 1998 04:00:00



Please help!!

I have sompiled Apache 1.3 with gcc version 2.8.1 under Solaris 2.6
I used fast instalation (./configure, make, make install)

The problem is: if I put .htaccess into directory, it does not touch it
at all!

I did not changed a lot the *conf files

Thanks for all your help !
---------------------------------------------------------
# truss ./httpd -X 2>/tmp/http.txt
...
brk(0x0009CEB0)                                 = 0
brk(0x0009EEB0)                                 = 0
stat("/usr/local/apache/share/htdocs/bla/index.html", 0x0009C028) Err#2
ENOENT
stat("/usr/local/apache/share/htdocs/bla", 0x0009C028) = 0
lstat("/usr", 0xEFFFF660)                       = 0
lstat("/usr/local", 0xEFFFF660)                 = 0
lstat("/usr/local/apache", 0xEFFFF660)          = 0
lstat("/usr/local/apache/share", 0xEFFFF660)    = 0
lstat("/usr/local/apache/share/htdocs", 0xEFFFF660) = 0
open64("/usr/local/apache/share/htdocs/bla/", O_RDONLY|O_NDELAY) = 5
fcntl(5, F_SETFD, 0x00000001)                   = 0
fstat64(5, 0xEFFFF688)                          = 0
...
# ls -al /usr/local/apache/share/htdocs/bla
total 12
drwxr-xr-x   2 local    local        512 Jul  9 12:55 .
drwxr-xr-x   4 local    local        512 Jul  9 12:25 ..
-rwxr-xr-x   1 local    local        298 Jul  9 12:55 .htaccess
-rwxr-xr-x   1 local    local        292 Jul  9 12:52 .htaccess~
-rw-r--r--   1 local    local        164 Jul  9 12:25 bl1
-rw-r--r--   1 local    local          0 Jul  9 12:25 bla
-rw-r--r--   1 local    local        150 Jul  9 12:25 htaccess_old

----------------------------------------------
I have taken out all # lines to shorten the list

------------------------------------------------
httpd.conf
------------------------------------------------
##
## httpd.conf -- Apache HTTP server configuration file
##
ServerType standalone

Port 80

HostnameLookups off

User local
Group local


ServerRoot /usr/local/apache

ErrorLog /usr/local/apache/var/log/error_log

LogLevel warn

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

CustomLog /usr/local/apache/var/log/access_log common

PidFile /usr/local/apache/var/run/httpd.pid

ScoreBoardFile /usr/local/apache/var/run/httpd.scoreboard

ServerName pluton.ijs.si

UseCanonicalName on

Timeout 300

KeepAlive On

MaxKeepAliveRequests 100

KeepAliveTimeout 15

MinSpareServers 5
MaxSpareServers 10

StartServers 5

MaxClients 150

MaxRequestsPerChild 30

------------------------------------------------
srm.conf
------------------------------------------------

##
## srm.conf -- Apache HTTP server configuration file
##

DocumentRoot /usr/local/apache/share/htdocs

UserDir public_html

DirectoryIndex index.html

FancyIndexing on

AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

DefaultIcon /icons/unknown.gif

ReadmeName README
HeaderName HEADER

IndexIgnore .??* *~ *# HEADER* README* RCS

AccessFileName .htaccess

DefaultType text/plain

AddEncoding x-compress Z
AddEncoding x-gzip gz

AddLanguage en .en
AddLanguage fr .fr
AddLanguage de .de
AddLanguage da .da
AddLanguage el .el
AddLanguage it .it

LanguagePriority en fr de

Alias /icons/ /usr/local/apache/share/icons/

BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
-----------------------------------------------
access.conf
------------------------------------------------
##
## access.conf -- Apache HTTP server configuration file
##

<Directory />
Options None
AllowOverride None
</Directory>

<Directory /usr/local/apache/share/htdocs>

Options Indexes FollowSymLinks

AllowOverride None

order allow,deny
allow from all

</Directory>

<Directory /usr/local/apache/share/cgi-bin>
AllowOverride None
Options None
</Directory>

 
 
 

Help: Apache .htaccess on Solaris 2.6 not working

Post by Rasmus Lerdo » Sat, 11 Jul 1998 04:00:00



Quote:> Please help!!

> I have sompiled Apache 1.3 with gcc version 2.8.1 under Solaris 2.6
> I used fast instalation (./configure, make, make install)

> The problem is: if I put .htaccess into directory, it does not touch it
> at all!
> <Directory />
> Options None
> AllowOverride None
> </Directory>

> <Directory /usr/local/apache/share/htdocs>

> Options Indexes FollowSymLinks

> AllowOverride None

> order allow,deny
> allow from all

> </Directory>

> <Directory /usr/local/apache/share/cgi-bin>
> AllowOverride None
> Options None
> </Directory>

Uhh..  You really should read:

  http://www.apache.org/docs/mod/core.html#allowoverride

When you put "AllowOverride None" you are telling Apache that no matter
what the contents of the .htaccess file, none of the directives in it
will be allowed to override directives in the main .conf files.  Apache
is a smart little puppy which then determines that there is no point in
even reading the .htaccess files since it wouldn't be allowed to use any
of the directives it finds anyway.

-Rasmus

 
 
 

Help: Apache .htaccess on Solaris 2.6 not working

Post by Marc Slemk » Sat, 11 Jul 1998 04:00:00



Quote:>Please help!!
>I have sompiled Apache 1.3 with gcc version 2.8.1 under Solaris 2.6
>I used fast instalation (./configure, make, make install)
>The problem is: if I put .htaccess into directory, it does not touch it
>at all!

[...]

Quote:><Directory />
>Options None
>AllowOverride None
></Directory>
><Directory /usr/local/apache/share/htdocs>
>Options Indexes FollowSymLinks
>AllowOverride None
>order allow,deny
>allow from all
></Directory>

You tell it "AllowOverride None", which means to disable setting
anything from the htaccess file, so of course it won't read it.
 
 
 

1. Htaccess on Solaris 2.6 Apache?

The solution to your problem:
Check the Allowoverride directive
http://www.apache.org/docs/mod/core.html#allowoverride
You need at least AllowOverride AuthConfig.
(Or you could just put the directives in your main config files and
forget about .htaccess.)

The solution to the problem you didn't know you had:
Delete the <Limit GET PUT POST> and </Limit> lines.  You need
limit if you want to limit ONLY PARTICULAR methods.  To limit all
methods, leave out the <Limit ...> stuff entirely.  Having it there is
very possibly a security risk.

--
Joshua Slive

http://finance.commerce.ubc.ca/~slive/

2. HELP! I need info on DECpc 433 Workstation!

3. URGENT HELP: passwd -d not working ons solaris 2.6 anymore ?

4. Clone running Operating System

5. (Help) FTP fails in Solaris 9 but not in Solaris 2.6

6. Multi-os-ing and RAM partitioning

7. Maxclients 512 doesn't work (Apache/Solaris 2.6)

8. XFree86 upgrade problem

9. apache 1.3 doesn't work on solaris 2.6

10. mmap64() not working on Solaris 2.6.

11. x86 solaris 2.6 /dev/lp not working

12. Applications Not Working Under Solaris 2.6

13. sunLib.rules missing on Solaris 2.6/Ultra 2, (xmkmf not working)