Apache problem

4 views
Skip to first unread message

Alex_hunt

unread,
Sep 28, 2011, 4:30:03 AM9/28/11
to RedHat.hclcdc.janakpuri
Hii friends.

I got a new problem today in configuration of my apache webserver.

I had created a directory named secretinfo in /var/www/html

[root@server html]# pwd
/var/www/html
[root@server html]# ls
! index.html secretinfo

i had created a file named passwd.txt inside this directory

[root@server html]# cd secretinfo/
[root@server secretinfo]# ls
passwd.txt
[root@server secretinfo]# cat passwd.txt
id:alex
passwd:1234567890
[root@server secretinfo]#

i am trying to secure my website through htaccess
here is configuration of my /etc/httpd/conf/httpd.conf file

# cat /etc/httpd/conf/httpd.conf

<VirtualHost 192.200.1.214>
ServerAdmin ro...@server.example.com

ServerName server.example.com

DocumentRoot /var/www/html

ErrorLog /var/log/httpd.txt

DirectoryIndex index.html

<Directory "/var/www/html/secretinfo">

AllowOverride AuthConfig

</Directory>

</VirtualHost>

[root@server secretinfo]#

i had created a .htaccess file inside /var/www/html/secretinfo
directory

[root@server html]# pwd
/var/www/html
[root@server html]# ls -a
. .. .htacess passwd.txt
[root@server secretinfo]#

here is the entry in my .htaccess file

[root@server secretinfo]# cat .htacess
AuthName “plz use a valid username and pasword”
AuthType basic
AuthUserFile /etc/httpd/htpasswd
Recquire user 123
[root@server secretinfo]#

i had also added a user named 123 in htpasswd file

[root@server secretinfo]# htpasswd -mc /etc/httpd/htpasswd 123
New password:
Re-type new password:
Adding password for user 123
[root@server secretinfo]#

i had restarted httpd service after this

[root@server secretinfo]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root@server secretinfo]#

Now when i am typing http://192.200.1.214/secretinfo in my web-browser
it is not asking for any password.
according to me it should ask for a password as i had secured the site
using .htaccess file.

Whats going wrong in this please tell me.

Alex_hunt

unread,
Sep 28, 2011, 4:30:41 AM9/28/11
to RedHat.hclcdc.janakpuri

Sudarshan Bisht

unread,
Sep 28, 2011, 5:04:05 AM9/28/11
to redhathcl...@googlegroups.com
Hi

Change the following line in /var/www/html/.htaccess
Recquire user   123
to
require valid-user

Regards
Sudarshan


--
You received this message because you are subscribed to the Google Groups "RedHat.hclcdc.janakpuri" group.
To post to this group, send an email to redhathcl...@googlegroups.com.
To unsubscribe from this group, send email to redhathcljanakp...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/redhathcljanakpuri?hl=en-GB.


Alex_hunt

unread,
Sep 28, 2011, 7:28:59 AM9/28/11
to RedHat.hclcdc.janakpuri
sudarshan i had changed the line to recquire user to recquire valid-
user but problem same problem is persisting

On Sep 28, 2:04 pm, Sudarshan Bisht <sudarshan.bisht2...@gmail.com>
wrote:
> Hi
>
> Change the following line in /var/www/html/.htaccess
> Recquire user   123
> to
> require valid-user
>
> Regards
> Sudarshan
>
> On Wed, Sep 28, 2011 at 2:00 PM, Alex_hunt <er.manish....@gmail.com> wrote:
> > Hii friends.
>
> > I got a new problem today in configuration of my apache webserver.
>
> > I had created a directory named secretinfo in /var/www/html
>
> > [root@server html]# pwd
> > /var/www/html
> > [root@server html]# ls
> > !  index.html  secretinfo
>
> > i had created a file named passwd.txt inside this directory
>
> > [root@server html]# cd secretinfo/
> > [root@server secretinfo]# ls
> > passwd.txt
> > [root@server secretinfo]# cat passwd.txt
> > id:alex
> > passwd:1234567890
> > [root@server secretinfo]#
>
> > i am trying to secure my website through htaccess
> > here is configuration of my /etc/httpd/conf/httpd.conf file
>
> > # cat /etc/httpd/conf/httpd.conf
>
> > <VirtualHost 192.200.1.214>
> >    ServerAdmin r...@server.example.com
> > Now when i am typinghttp://192.200.1.214/secretinfoin my web-browser

Sudarshan Bisht

unread,
Sep 28, 2011, 7:42:12 AM9/28/11
to redhathcl...@googlegroups.com
The spelling you r typing is incorrect.
recquire valid-user
must be
require vald-user

Regards
Sudarshan

Alex_hunt

unread,
Sep 29, 2011, 12:33:21 AM9/29/11
to RedHat.hclcdc.janakpuri
done dudharshan but still same result.................

On Sep 28, 4:42 pm, Sudarshan Bisht <sudarshan.bisht2...@gmail.com>
wrote:
> The spelling you r typing is incorrect.
> recquire valid-user
> must be
> require vald-user
>
> Regards
> Sudarshan
>
> > > > Now when i am typinghttp://192.200.1.214/secretinfoinmy web-browser
Reply all
Reply to author
Forward
0 new messages