This is a discussion on How to make htaccess work within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi all, some problems with the new installed SuseLinux 9.2 and Apache 2 here. Server does not seem to ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi all,
some problems with the new installed SuseLinux 9.2 and Apache 2 here. Server does not seem to accept any htaccess files in any directory. IŽd copied some working htaccess files using mod_rewrite from Win32 PC (using Apache 1.3.33 there) to the Linux machine (via Samba). After setting up the haccess files to make mod_rewrite work I found out he wasnŽt using any rules I did to the access file. I tested ErrorDocument 404 http://www.test.com/error/404.html Options +FollowSymLinks RewriteEngine on #basic rule RewriteRule ^([a-z]*).html$ index.php?vp=$1.php But rewrite didnt work and server displayed standard 404 error page, so htaccess didnŽt seem to be used at all. What changes in the Apache configs have to be done to make htaccess to be used? Greetings Patrick |
|
|||
|
On 2005-01-25, Patrick Beerhorst wrote:
> Hi all, > > some problems with the new installed SuseLinux 9.2 and Apache 2 here. > Server does not seem to accept any htaccess files in any directory. > IŽd copied some working htaccess files using mod_rewrite from Win32 > PC (using Apache 1.3.33 there) to the Linux machine (via Samba). > After setting up the haccess files to make mod_rewrite work I found out > he wasnŽt using any rules I did to the access file. > > I tested > > ErrorDocument 404 http://www.test.com/error/404.html > > Options +FollowSymLinks > RewriteEngine on > > #basic rule > RewriteRule ^([a-z]*).html$ index.php?vp=$1.php > > But rewrite didnt work and server displayed standard 404 error page, so > htaccess > didnŽt seem to be used at all. > > What changes in the Apache configs have to be done to make htaccess to be > used? > You need to make sure that the 'AllowOverride' directive is set to something other than 'None' (eg 'All' or some particular directive) for the directory you are accessing. eg in http.conf: <Directory "/var/www/htdocs/test"> AllowOverride All Order allow,deny Allow from all </Directory> -- Mike Peters mike [-AT-] ice2o [-DOT-] com http://www.ice2o.com |
|
|||
|
Hi Mike,
I did these minor changes and restarted the Apache, put a test .htacess in the dir: AuthUserFile /srv/www/htdocs/test/.htpasswd AuthType Basic AuthName "test" require valid-user So a popup should apear when browsing to this dir. Result: Browser displays the page. Testet that on Win32 with 1.3.33: working fine, popup apears... Settings in the httpd.conf (Win) <Directory /> Options FollowSymLinks AllowOverride All </Directory> Greetings Patrick "Mike Peters" <o0__mike__0oREMOVE@THIShotmail.com> schrieb im Newsbeitrag news:1106653248.ed4d40c2579b0c6b3df67754c39880c8@t eranews... > On 2005-01-25, Patrick Beerhorst wrote: >> Hi all, >> >> some problems with the new installed SuseLinux 9.2 and Apache 2 here. >> Server does not seem to accept any htaccess files in any directory. >> IŽd copied some working htaccess files using mod_rewrite from Win32 >> PC (using Apache 1.3.33 there) to the Linux machine (via Samba). >> After setting up the haccess files to make mod_rewrite work I found out >> he wasnŽt using any rules I did to the access file. >> >> I tested >> >> ErrorDocument 404 http://www.test.com/error/404.html >> >> Options +FollowSymLinks >> RewriteEngine on >> >> #basic rule >> RewriteRule ^([a-z]*).html$ index.php?vp=$1.php >> >> But rewrite didnt work and server displayed standard 404 error page, so >> htaccess >> didnŽt seem to be used at all. >> >> What changes in the Apache configs have to be done to make htaccess to be >> used? >> > You need to make sure that the 'AllowOverride' directive is set to > something other than 'None' (eg 'All' or some particular directive) for > the directory you are accessing. eg in http.conf: > > <Directory "/var/www/htdocs/test"> > AllowOverride All > Order allow,deny > Allow from all > </Directory> > > > -- > Mike Peters > mike [-AT-] ice2o [-DOT-] com > http://www.ice2o.com |
|
|||
|
On 2005-01-25, Patrick Beerhorst wrote:
> Hi Mike, > > I did these minor changes and restarted the Apache, put a test .htacess in > the > dir: > > AuthUserFile /srv/www/htdocs/test/.htpasswd > AuthType Basic > AuthName "test" > require valid-user > > So a popup should apear when browsing to this dir. Result: Browser > displays the page. Testet that on Win32 with 1.3.33: working fine, > popup apears... > > Settings in the httpd.conf (Win) > ><Directory /> > Options FollowSymLinks > AllowOverride All ></Directory> > Do you have AccessFileName set to something other than .htaccess? It should default to .htaccess if it isn't set or you could add: AccessFileName .htaccess just to make sure. -- Mike Peters mike [-AT-] ice2o [-DOT-] com http://www.ice2o.com |
|
|||
|
Yes, it is
AccessFileName .htaccess default - i have not changed that. Greetings Patrick "Mike Peters" <o0__mike__0oREMOVE@THIShotmail.com> schrieb im Newsbeitrag news:1106656976.0ac77bc930bd50d79d00580999d3f2ef@t eranews... > On 2005-01-25, Patrick Beerhorst wrote: >> Hi Mike, >> >> I did these minor changes and restarted the Apache, put a test .htacess >> in >> the >> dir: >> >> AuthUserFile /srv/www/htdocs/test/.htpasswd >> AuthType Basic >> AuthName "test" >> require valid-user >> >> So a popup should apear when browsing to this dir. Result: Browser >> displays the page. Testet that on Win32 with 1.3.33: working fine, >> popup apears... >> >> Settings in the httpd.conf (Win) >> >><Directory /> >> Options FollowSymLinks >> AllowOverride All >></Directory> >> > Do you have AccessFileName set to something other than .htaccess? It > should default to .htaccess if it isn't set or you could add: > AccessFileName .htaccess > > just to make sure. > -- > Mike Peters > mike [-AT-] ice2o [-DOT-] com > http://www.ice2o.com |