How do I make a login and password so only selected people can view my website on the internet?

Asked by george_rutkay

I know I keep asking this question in various incarnations.....it's because the answers I receive aren't in any usable format for me -they are more or less written with much more experienced people in mind in the Linux environment. I have no real experience with these things so I really need to be guided through it in plain English terms, what software I require, what I have to set up and how to make it work in a stable fashion.

I can't do guesswork or try to investigate it myself - it just takes too much time away from my other family and work responsibilities and it will never get done unless I have a guided form of advise on exactly what my machine requires to:

1) serve a website with a dynamic IP address (I'ave actually gotten this far and it's running by some miracle)
2) disallow any access to the website unless the person has their correct login and password.

It's just a music server and I'm only letting select relatives and friends have the access to songs I've put on my computer.

I don't necessarily care what technology exists to accomplish this, whether it's a stone knife or a hamster on a wheel.....I need the results to happen and I need to be able to manage it given what I am able to know and learn.

I'm no programmer and I will never be able to keep up with the knowledge that other computer experts will be able to acquire. I'm just trying to get done what's expected of me because in the whole family I'm the only one who is considered computer literate.

Is anybody able to help please?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
george_rutkay
Solved:
Last query:
Last reply:
Revision history for this message
hardcorelinux (hardcorelinux) said :
#1
Revision history for this message
george_rutkay (yaktur) said :
#2

I tried following the steps in this link:

http://www.yolinux.com/TUTORIALS/LinuxTutorialApacheAddingLoginSiteProtection.html#GROUP

.....copying and pasting what I could and trying to make changes appropriate to my system.

I don't know which parts I'm supposed to change and which are commands so it's VERY confusing. I'm a total NOOB when it comes to any of this and the command line and what means what......well it's very baffling!

It still doesn't work - I can still see the directories in the web page without every being prompted for a login or password. Yes I did restart Apache also. It didn't help. And I still get error messages I don't understand from restarting Apache:

root@Dell1:~# /etc/init.d/apache2 restart
 * Restarting web server apache2
apache2: apr_sockaddr_info_get() failed for Dell1
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Mon Jun 16 21:10:21 2008] [warn] NameVirtualHost *:0 has no VirtualHosts
apache2: apr_sockaddr_info_get() failed for Dell1
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Mon Jun 16 21:10:31 2008] [warn] NameVirtualHost *:0 has no VirtualHosts
[ OK ]

This is what my .htaccess file looks like in my /var/www/public/ directory

<Directory /var/www/membersonly>
AuthType Basic
AuthName "Password Required"
AllowOverride AuthConfig
AuthUserFile /var/www/public/.htpasswd
</Directory>

There are a total of 7 users including myself I want to permit access to the music files in this directory and some movies & videos in another directory.

The web directories I wish to guard with login and password on my computer are at:

/var/www/public/music/
/var/www/public/videos/

Please assist me? What files should I create? Where must they be created? And what should their contents look like?

I am trying to fumble through this tutorial but it's still too advanced for someone who has never messed with Apache before. I don't know when I'm doing this right or wrong, when I should copy and paste literally and whether some parts need to be altered - and if so, WHAT parts and how should they be altered on the command line in the file?

Revision history for this message
george_rutkay (yaktur) said :
#3

I'm reading and re-reading the www.yolinux tutorial and I'm just hopeless at this stuff, it all looks very literal - and if I try to use the information in the link, I just end up getting it wrong.

Isn't there something simpler to teach total beginners how to configure this stuff?

Revision history for this message
george_rutkay (yaktur) said :
#4

Is Ubuntu version 8.04 easier to configure? I have it on CD, I received it recently. But I have like 50 gig of stuff that will never get backed up (kids music, videos, etc.....you know how kids are) and I hesitate to just turn the family computer into some lab experiment without knowing what I'm getting into.

Revision history for this message
george_rutkay (yaktur) said :
#5

I tried looking at this site for help:

http://doc.ubuntu.com/ubuntu/serverguide/C/httpd.html

Some of it is in English, but the rest is in gibberish. I just don't understand any of it. It's like it's written in it's own private language and you have to take a course before you can even decipher what the author means.

PS: I'm not illiterate - I'm an electronics hardware engineer. But software and programming isn't a part of my daily life really, so this is really difficult to understand.

Imagine an average user's experience!

Isn't there a simpler more refined, civil way to accomplish this in this day and age (aside from blowing megabucks on a Mac)?

Revision history for this message
george_rutkay (yaktur) said :
#6

Help? Anybody please?

Revision history for this message
Lynoure Braakman (lynoure) said :
#7

It might be easiest to turn to the Canonical support or their associates for step-by-step guidance or even setting it all up for you. A skilled sysadmin could set it up in less than an hour, and leave you with instructions on how to add music and users and how to keep yours setup secure. I'd go for https + .htpasswd myself, personally.

If you just wanted to share your music in the local network, e.g. between computers of your house, take a look at http://ubuntu.wordpress.com/2006/09/22/share-music-in-a-network-using-avahi-daap/

Revision history for this message
george_rutkay (yaktur) said :
#8

I don't do credit cards so paying for support is impossible - besides I couldn't afford that anyways.

I've just recently discovered (today in fact) that there are user groups in Canada - I never knew that!

So I've submitted my question to them.

I'll mark this as "solved" although I'm no closer to a solution. Eventually my hope is to take the knowledge I have gained from this and use it to set up a website (complete with a secure login) over at the family farm for their business.