Thread: htaccess Issues.
first of all, i'd apologize how stupid question may (i'm unsure)
installed ubuntu server 12.10 on old pc last week (for do) , until has been going smoothly. please note have no previous experience server - thought little project
i've got open ssh server installed, apache2, php5 , mysql.
last night set simple website , started hosting - when came .htaccess started getting messy! no online tutorials seem include how create these files (in notepad , drag , drop or actual server!?)
made them using notepad on pc , dragged them over, placing them in directory wanted protect (this called data , held in /var/www folder. authentication pop-up works great no matter how many times input username , password, pops again. i've looked through pretty every site can find , after changing allowoverride all, there's nothing else can find me. when have htaccess , htpasswd files in directory now, tells me there server error. dont know whether have messed , considered re-installing entire server system , starting again!
hoping 1 of kind people save me hitting head against wall again - couldn't sleep last night because of headache! ha.
thank
have looked in /var/log/apache2/error.log see if there more details?
both .htaccess , .htpasswd files in locations "www-data" user can read? have proper permissions allow user read them? make sure references files absolute ones full paths (see below).
it's never idea move text files directly windows *nix machines because differ in how designate end of lines. install package tofrodos , apply files strip extraneous line terminators. in future use text editor on local machine gedit or kate, or command-line tools nano or emacs.
notice full path password file, called .htpasswd here. also, security purposes, file should not kept in same directory web site files. can place anywhere in system long www-data user can read it.code:authuserfile /path/to/.htpasswd authgroupfile /dev/null authname "friends only!" authtype basic <limit get> require valid-user </limit>
Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms [ubuntu] htaccess Issues.
Ubuntu
Comments
Post a Comment