Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

APACHE - PASSWORD/VIRTUAL HOST PRBLM ---)

Posted on 2000-02-24
8
Medium Priority
?
239 Views
Last Modified: 2013-11-15
I am currently running APACHE as a web server and have configured .htaccess security files and the have worked propperly, that is they ask for a password when you come to a restricted area of the webpage. BUT ever since I have installed ANY virtual hosts it has not worked AT ALL ANYWHERE although the virtual host does. PLEASE SOMEONE HELP ME... thanks in advanced...
0
Comment
Question by:TENSOR
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 2556602
Do you mean that all user authentication stopped working, real and virtual instances? Or do you mean that the virtual hosts aren't honoring .htaccess files in their respective htdocs directories? Being able to see one of your virtual host config sections would help a lot in our being able to solve this problem.
0
 

Author Comment

by:TENSOR
ID: 2556696
############## THIS SECTION WAS ADDED BY SENTHIL - ###########
NameVirtualHost 63.194.81.67
<VirtualHost 63.194.81.67>
ServerName www.v-solve.com
DocumentRoot /somewhere/abc/html/
AccessFileName .htaccess
</VirtualHost>
########## LELANDSD.COM - SENTHIL #############################
<VirtualHost 63.194.81.67>
ServerAdmin fatalerror404@hotmail.com
ServerName www.lelandsd.com
DocumentRoot /somewhere/else/lelandsd/
AccessFileName .htaccess
</VirtualHost>
<VirtualHost 63.194.81.67>
ServerAdmin fatalerror404@hotmail.com
ServerName lelandsd.com
DocumentRoot /somewhere/else/lelandsd/
AccessFileName .htaccess
</VirtualHost>
################################################
0
 

Author Comment

by:TENSOR
ID: 2556698
Edited text of question.
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
LVL 40

Expert Comment

by:jlevie
ID: 2557334
First, you don't need to the "AccessFile" directive in each virtual host section. It's sufficient to declare it once in the global section. Typically one wants to have at the global level a piece like:

AccessFileName .htaccess
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>

Which defines the htaccess file name and prevents those files from being seen if the document directory is browseable.

The reason that your virtual hosts aren't requiring user authentication is that you've not told Apache to do so. Each directory to be protected must allow user authentication to be set up with an "AllowOverride Authconfig" directive. Also, there's a couple of other directives one should typically apply to a directory (especially a document root). So one of you virtual hosts should look like:

<VirtualHost 63.194.81.67>
ServerName www.v-solve.com 
DocumentRoot /somewhere/abc/html/
<Directory />
    Options Indexes FollowSymLinks
    AllowOverride AuthConfig
    Order allow,deny
    Allow from all
</Directory>
</VirtualHost>
0
 

Author Comment

by:TENSOR
ID: 2560161
Please post your awnsers as comments as the future, If they work I will acept it as an awnser...
0
 

Author Comment

by:TENSOR
ID: 2560185
I meant to accept that...please write it again and I will accept...
0
 
LVL 40

Accepted Solution

by:
jlevie earned 300 total points
ID: 2560295
First, you don't need to the "AccessFile" directive in each virtual host section. It's sufficient to declare it once in the global section. Typically one wants to have at the global level a piece like:

AccessFileName .htaccess
<Files ~ "^\.ht">
   Order allow,deny
   Deny from all
</Files>

Which defines the htaccess file name and prevents those files from being seen if the document directory is browseable.

The reason that your virtual hosts aren't requiring user authentication is that you've not told Apache to do so. Each directory to be protected must allow user authentication to be set up with an "AllowOverride Authconfig" directive. Also, there's a couple of other directives one should typically apply to a directory (especially a document root). So one of you virtual hosts should look like:

<VirtualHost 63.194.81.67>
  ServerName www.v-solve.com 
  DocumentRoot /somewhere/abc/html/
    <Directory />
      Options Indexes FollowSymLinks
      AllowOverride AuthConfig
      Order allow,deny
      Allow from all
  </Directory>
</VirtualHost>
0
 

Author Comment

by:TENSOR
ID: 2560401
thanks!
0

Featured Post

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

VM backups can be lost due to a number of reasons: accidental backup deletion, backup file corruption, disk failure, lost or stolen hardware, malicious attack, or due to some other undesired and unpredicted event. Thus, having more than one copy of …
A Bare Metal Image backup allows for the restore of an entire system to a similar or dissimilar hardware. They are highly useful for migrations and disaster recovery. Bare Metal Image backups support Full and Incremental backups. Differential backup…
This tutorial will walk an individual through the process of configuring basic necessities in order to use the 2010 version of Data Protection Manager. These include storage, agents, and protection jobs. Launch Data Protection Manager from the deskt…
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question