Hi,
I am trying to password protect 2 virtual hosts "/share/Web/Site1” and "/share/Web/Site2”. I have searched the forums on this subject and learned a lot, but still need some help.
I want to use the Directive method (not sure this is the correct name) and put the userid and passwords in a database file because it is more secure then the .htaccess method.
The following are the 2 Directives that I would like to use. One for each virtual host with a different userid and password database:
<Directory "/share/Web/Site1">
AuthName "Log into Web Site"
AuthType Basic
AuthBasicProvider dbm
AuthDBMUserFile "/share/passwords/passwords1.dbm"
Require valid-user
</Directory>
<Directory "/share/Web/Site2">
AuthName "Log into Web Site"
AuthType Basic
AuthBasicProvider dbm
AuthDBMUserFile "/share/passwords/passwords2.dbm"
Require valid-user
</Directory>
The following are the description for each field, if I got them correct:
Directory
Specifies the directory that the following configuration applies to
AuthName "Log into Web Site"
The text that will display when logging in
AuthType Basic
Allows the use of HTTP Basic Authentication to restrict access by looking up users in the given providers.
AuthBasicProvider dbm
Authenticate users by looking up users in dbm password files
AuthDBMUserFile "/share/passwords/passwords1.dbm"
Sets the name of a DBM file containing the list of users and passwords. Do not put the DBM file in the directory that it protects. A perl script dbmmanage or a program htdbm can be used to create and update DBM format password files.
Require valid-user
Valid user is required
I think these directives should go in the apache.conf file. I found 3 of these files and not sure which one to use:
/hd_root_tmp/.config/apache/apache.conf
/usr/local/apache/conf/apache.conf
/etc/default_config/apache.conf
To create the userid and password database file in found the commands htdbm and dbmmanage in directory "/usr/local/apache/bin" but can’t get it to work using a console in WinSCP.
I am new at this and not sure I have this correct.
Regards
Alan
Help with Password Protection of Web Server Virtual Hosts on QNAP 4.3.6
Post your questions about Web Server usage and Apache + PHP + MySQL/SQLite web applications.
Return to “Web Server & Applications (Apache + PHP + MySQL / SQLite)”
Jump to
- QNAP General
- ↳ Announcements
- ↳ Features Wanted
- ↳ Users' Corner
- ↳ Official Apps
- ↳ Prestashop
- ↳ Webalizer
- ↳ Virtualization Station
- ↳ Notes Station
- ↳ SocialLink Station
- ↳ McAfee Antivirus
- ↳ IT Management Station
- ↳ Container Station
- ↳ Qsirch & Qfiling
- ↳ Community Apps
- ↳ Apps Wanted
- ↳ Partner Apps
- ↳ BitTorrent Sync
- ↳ EZPhone
- ↳ Plex Media Server
- ↳ Ragic
- ↳ Tonido
- Getting Started
- ↳ Frequently Asked Questions
- ↳ Presales
- ↳ Turbo Station Installation & Setup
- General
- ↳ Hardware & Software Compatibility
- ↳ HDD Spin Down (HDD Standby)
- ↳ Seagate Drive Discussion
- ↳ Western Digital Drive Discussion
- ↳ File Sharing
- ↳ Mac OS
- ↳ Linux & Unix (NFS)
- ↳ Windows
- ↳ Backup & Restore
- ↳ Symform
- ↳ Microsoft Azure
- ↳ OpenStack Swift
- ↳ Amazon Glacier
- ↳ Amazon S3
- ↳ WebDAV-based Backup
- ↳ Google Cloud Storage
- ↳ Object Storage Server
- ↳ ElephantDrive
- ↳ Xopero
- ↳ System & Disk Volume Management
- ↳ Web Server & Applications (Apache + PHP + MySQL / SQLite)
- ↳ Download Station and QGet
- ↳ myQNAPcloud service
- ↳ Surveillance Solution
- ↳ Miscellaneous
- ↳ QIoT
- ↳ QuAI
- ↳ QVR Face
- Business
- ↳ Windows Domain & Active Directory
- ↳ iSCSI – Target & Virtual Disk
- ↳ Remote Replication/ Disaster Recovery
- ↳ Server Virtualization & Clustering
- ↳ NAS Management
- ↳ QES Operating System (QNAP Enterprise Storage OS)
- Multimedia
- ↳ Photo Station, Music Station, Video Station
- ↳ Media Streaming
- ↳ Mobile Devices