top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Apache: enabling htaccess in vhosts

+1 vote
388 views

I googled but cant figure it out.

posted Sep 6, 2014 by Sidharth

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Cross check your options in apache config, it should be something like

<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride all 
    Order allow,deny
    Allow from all
</Directory>
answer Sep 6, 2014 by Jai Prakash
Similar Questions
0 votes

It seems that I've hit a size limitation when adding unwanted IPs to a "Deny From" line.
Is there any place where this is specified?
Also, if I hit the max length on a "Deny From" line, can I add another "Deny From" line?

(Running CentOS 6, and the following version of Apache: httpd-2.2.15-28.el6.centos.x86_64)

0 votes

I really don't understand some things about htaccess. Reading, the advice is: never permit htaccess to users. So, can I enable htaccess but only for personalize something like this?

ErrorDocument 400 /errors/badrequest.html
ErrorDocument 401 /errors/authreqd.html
ErrorDocument 403 /errors/forbid.html
ErrorDocument 404 /errors/notfound.html
ErrorDocument 500 /errors/serverr.html

and obviously deny all other directives? so an user with own htaccess file, can only personalize that directives.

+2 votes

I'm trying to use the new If directive present from Apache 2.4, to configure an htaccess based authentication for a specific Location based to the client IP address. If a client hasn't an IP address related to the internal VLAN, I would set the password access.

What is the correct syntax to have this configuration? I noticed on the documentation that there is the "-ipmatch" condition, but I don't understand well this feature.

...