How to use "htaccess" on synology system for website access control? - apache

I am trying to set up the access control for my personal website on synology NAS. Right now I am using DS212J. I found the following article teaching how to use "htaccess" on apache to achieve that.
http://www.synology.com/support/faq_show.php?lang=enu&q_id=347
But I encountered 2 problem:
1) I don't have the command "htpasswd" after ssh to my DS212J.
2) After I manually create those files, I got the username and password prompting up on the website. However, the password in "admin.pw" and "normal.pw" doesn't work when I type in. I am not sure whether it is because I didn't use command "htpasswd".
What am I missing here?
Thanks.

The htpasswd executable is at /usr/syno/apache/bin/htpasswd. As that directory is not on the PATH, you have to explicitly use the whole path to use it:
Apache doesn't keep passwords in plain text, it uses a hash of them so that even if someone gets access to the password file they won't be able to log in. That's why you must use htpasswd to create the file.

For anyone who comes across this, I couldn't get that synology support tutorial to work either. I am running DSM 5.1-5022 Update 4 on my own domain with ssl. Here's how it got it working:
Follow the steps in the following wiki: Synology Wiki
In the control panel, go to "Web Services" and disable SPDY for secure connections. (Gleaned from this article.)
Good luck.

Related

Password Protecting directory using Apache and windows authentication? NOT .htaccess

For part of my assignment, I had to create two local directories in my Apache htdocs path and password protect them so that only one user can access them. I did this using htaccess. However, this was apparently the wrong answer because they wanted authentication using windows user login user/pwd.
I don't understand how i can do this. How can i create a folder that is only accessible by the user with the same name?
Thanks for any advice. I do not need a solution, just some information on where to start looking. Everything I find seems to require htaccess. Unless i am thinking of this wrong and there is a module i can use with htaccess to make this work.
Thanks for the help.
I am not sure what your prof is looking for but you can probably do this by working with the windows folder sharing and permission options
Setting folder Share permissions

openshift cannot enter web2py administrative page

I am not an IT person, using ubuntu 12.10.
I am trying to setup sahana software in openshift. I followed the guidelines from this page. It works fine until the point where I should use administrative interface. I tried every single possible password related to openshift, but none worked. It also only gave me four chances.
The guideline said, "Once your app is up you'll need administrative access to continue. For the admin app to work you need to put your password hash in parameters_8080.py in wsgi/web2py/."
I found the parameters_80.py but have no clear idea what to do with it. I tried to use htpasswd to create a new parameters_80.py but the admin interface still rejected me.
Can someone help me?
Thanks.
I think this thread seems to answer your question https://groups.google.com/forum/#!msg/web2py/DJvC9FMNohE/NykebQn5eUQJ

Lynx file "/etc/lynx.lss" is not available

using cpanel server, setting a simple "lynx http://www.domain.com/script.php" command gives following error and I am unable to understand it.
Lynx file "/etc/lynx.lss" is not available.
the problem is the SHELL.
You can solve this problem via two ways:
1] I simply changed the sentence:
SHELL="/usr/local/cpanel/bin/jailshell"
in /var/spool/cron/account
to SHELL="/bin/bash"
2] You can copy file /etc/lynx.lss
to directory: /home/virtfs/account/etc
Both worked for me !
Wilhelm
You can create an empty (or not) style sheet file in a directory where you have write access, then explicitly point to that file on the lynx command-line:
lynx -lss=/path/to/my/lynx.lss ...
I enabled shell access for the account and it started working. The above answer seems to assume you have access to the entire server and can modify those files, if so then just enable shell access and you are set, but if you are on a shared hosting account basic cpanel and ftp access you may not be able to do it. Ask you hosting company if you can have shell access. Then decide what you can do depending on the answer they give you.
you can solve this issue by follow below process :-
Open this file
root#server [~]# vi /var/cpanel/exim.conf.deps
and append below entries and save it.
/etc/lynx.lss

How get running squid3 with a local datase user?

I want get running squid3 and obligate users to authenticate again a local and simple database users-pass file. Can be user-pass file of the system or a simple .txt file, whatever is more easy.
Here is a more comprehensive guide to setting up a Squid 3 server with htdigest authentication: http://dabase.com/blog/Minimal_squid3_proxy_configuration/
Using
/usr/lib/squid3/digest_pw_auth
helper that come with squid installation works.
/usr/bin/htdigest
can be used to create the user-pass file.

How to authenticate users on TortoiseHg web server?

TortoiseHg web server configuration has an "Allow Push" parameter where I put the users allowed to push changes. But when I try to push I get an "authorization failed" error. How are the users authenticated? Where do the passwords come from?
Setting allow_push = * will allow anybody to push to your repository served with hg serve. You should of course only do that on a trusted network. Apart from that, you cannot do authentication with hg serve -- you need a webserver in front of it that will authenticate users.
Please see hgrc for a terse explanation of allow_push and the wiki for a slightly longer explanation about what hg serve is for.
I'm just getting into Mercurial, and from what I can tell (and read in the documentation), the TortoiseHg web server isn't meant to be a permanent solution. The docs seem to steer you towards running either Apache or lighttpd.
You may also want to check out Vampire Basic's tutorial on running Mercurial on Windows.
I believe you can just edit your hgrc file, under the [authorize] section:
Store password in TortoiseHg