Tutorial on Apache logins written for non-technical people?

Asked by george_rutkay

It's so difficult to understand these other tutorials I've been presented with in my quest to simply make a login and password for my personal website being hosted on the family computer at home.

I don't have the understanding of the techno-babble used in these Apache tutorials - it's simply not part of my daily job or life to acquire this depth of knowledge for such a solitary and specific subject.

Aren't there any sensible solutions for average people to impliment?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Jim Hutchinson
Solved:
Last query:
Last reply:
Revision history for this message
LeGreffier (ylamouroux) said :
#1

An apache login manager should be pretty hard to set, and very uneffective.
You can do it fine with PHP, lots of tutorials about this on the web.
http://www.phpbuddy.com/article.php?id=23
https://help.ubuntu.com/8.04/serverguide/C/php5.html

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

Ok, how would I set up a user login and password thing under PHP? I have no idea about what PHP is.

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

Is there any program I can use from Synaptic which would generate PHP for me? It looks like quite a nightmare to memorize and type manually.

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

PHPbuddy seemed to give me something to work with......I don't want the login and password to be visible if the person clicks on "View/Page Source" in their browser.

So I just basically "stole" his script and modified the login and password to suit myself - heck, I'll NEVER learn to write anything like this! I'm a hardware engineer, I am not a software person. I deal in hardware, reactances, volts, Ohms and discrete components. Analog design in my head, not this software stuff.

Of course once I enter my own login and password, then it doesn't let me into my own website, it just shows a blank screen!! Good grief!

I've been reading this PHP stuff........I'm absolutely TORTURED with this unbelievable PHP and mySQL nonsense now so passwords and stuff won't be visible in a browser - just to try to get anything working and behaving as the websites "claim" it should work......Oh BROTHER, these people ought to be locked up in an asylum!! They're absolutely nuts for creating such nightmarishly complicated software and commands! And it doesn't even work when you install it from Synpatic! What's the point! It just gives all kinds of strange cryptic error messages!

Give me my Analog circuits any day over this programming nightmare!

Does anybody have any better ideas how to create a login and password thing for a website which is a bit simpler than this? But at the same time it has to completely mask the login name and password in case someone without permission wants to share my music and is smart enough to just click on "View/Page Source" in their Firefox Browser.

Heck, I think I'd be better off just burning my music as MP3s onto a CD and mailing them to my friends - this web nonsense is just total rubbish! Why isn't there more of a usable solution?

I tried this phpadmin stuff as well.....according to apt-get install phpadmin I have the newest version! But if I go to my browser and do:

http://localhost/phpMyAdmin/

then I only end up with:

"The requested URL was not found on this server. The link on the ">referring page seems to be wrong or outdated. Please inform the author of ">that page about the error. If you entered the URL manually please check your spelling and try again."

Of course this is just another nail in the coffin of my enthusiasm for this web rubbish!! I'm getting so tired of these error messages, failures and other junk that just doesn't work.

Sorry if I sound frustrated......it's because I am extremely frustrated over what I believe ought to be a simple task - login and password protect a directory or two on my computer's internet presence so only selected individuals can access it.

Does anybody have ANY idea on what to do next, besides taking the computer to the back yard and setting it on fire?

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

I've gone into Synaptic and I've ripped out mysql and php5 by their respective roots.....I don't trust this stuff - it doesn't work when I install it and try to follow directions to configure it.

And I am just about ready to totally give up on this idea forever unless someone somewhere can give me a better idea how to do this over a web browser and not let other people who don't have a login and password see my files.

This isn't software for everyone, this is torture-ware!

Revision history for this message
Jim Hutchinson (jphutch) said :
#6

George, PHP and mysql are hard core web sever tools designed for the .001% of the population trained to deploy web servers. That isn't to say other people can't learn to use it. It's just not designed for normal computer users as pretty much none of them will ever touch it. In other words, they didn't make it overly friendly but it works beautifully. As it's running on many, many web servers I think it's at least as trustworthy as anything else on the web.

Setting up a home computer to be a web server is not overly common yet so there are not very many tools to do it - at least as far as I'm aware. By far, the simplest one I've found is webfs. You need to deal with a config file and forwarding a port but once that is worked out it works fine. I don't have it set up anymore myself so I can't show you. I could probably set it up again if you want to see but I won't be able to do it any time soon.

There are also a lot of web sites designed to allow you to host and share files. Flickr for example for photos and others. Amazon now has a some service to allow you to set up servers. I don't much about it and I think it's probably overkill for a single individual but maybe not - http://www.amazon.com/gp/browse.html?node=201590011.

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

I never got WebFS to work - it installed but I had no access to it, no way to configure it or even interrogate it, not even through terminal.

I am trying to figure out how to do all of this on the local computer so I can take this knowledge over to the family farm and help them set up their own website without having to depend on anyone else to host it, regardless of the price.

Hard core tools? Wow, you're not kidding!

Are there any tutorials which will help a person set up and configure these things from beginning to end, including when things don't work properly?

Revision history for this message
LeGreffier (ylamouroux) said :
#8

I think you shouldn't go in so many directions for now...

a few things i have to say , after i read your answers :

* people won't see your PHP code, the php files remains on the server,
and the server generate html pages with this (of course this is false if
the apache or system is misconfigured)

* if you find php too complicated, another way to do that is
with .htaccess (this is more simple, but still pretty complex if you are
unfamiliar to software administration on linux)
here is the apache doc about this :
http://httpd.apache.org/docs/2.2/howto/htaccess.html
and also http://httpd.apache.org/docs/2.2/howto/auth.html
there might be easier doc (use google, or the ubuntu site) , your
keyword is htaccess

* if you want to share files (no confidential, but will ask for password
and limit access) you might consider using ftp. (proftpd package on
ubuntu, it has a nice gui to tweak it : gproftpd)

* if you want some web, with password, consider CMS as Drupal, Dotclear
or Wordpress : they provide an administration panel , and let you do
authentifications without the "codes" things.

* An efficient apache is technical, even with packages, this is
straightforward , and painful at the beggining , but it worth it.

--
Lamouroux Yoann <email address hidden>

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

.htaccess and other Apache stuff like that just looks like a headache to me, half of it looks like it's written in an alien language.

I want to go the Apache route but I'm constantly stymied.

For example, the tutorial references to how this .htaccess is in the same Syntax as main configuration files.....well I don't know what those are - I have no experience in it and I wouldn't recognize if anything was right or wrong.

I tried installing Drupal but it asks for some password during the installation process and when I don't know or guess what password it's thinking of, it just keeps going back like a loop to the beginning of the installation. What a waste of time.

I have the Apache Tutorial: .htaccess files webpage open, literally along side with the .htaccess file in the server directory on my computer.

There's nothing in the Apache tutorial which helps me understand exactly what I'm supposed to look for or anything.....I don't know whether what I have is right or wrong and I am very reluctant to change anything arbitrarily because the commands only vaguely resemble English words, but their true power over my system's behaviour is not understood well enough by me to help me make confident changes which I can un-do if things mess up.

In other words, I don't understand what the tutorial is telling me. It's written for more experienced people and the author made it far too complicated for Noobs like me!

FTP might work for me, but not for some of the other family members who possess far less computer experience and would not be able to use FTP. I know it sounds strange but it's true.

Here - this is the contents of my .htacess file:

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

The directory I wish to guard with a login and password for 7 individual separate users is located on my computer at:

/var/www/public/

The contents of this directory consists of two other directories:
/music/
/videos/

So the total path is:
/var/www/public/music/
/var/www/public/videos/

Let's say the 7 users are user:
A
B
C
D
E
F
G

and their passwords respectively are:
aa
bb
cc
dd
ee
ff
gg

What do I do, exactly please in order for Apache to guard itself with a login and password?

Thanks.

Revision history for this message
Best Jim Hutchinson (jphutch) said :
#10

If you want to host a web site for a business (I'm assuming the farm is a business) then a dedicated server is probably a better option and the server install has an option to install LAMP which is all the pieces you need to run a web server. I'm not sure it's any easier to configure. You would probably also have to get a business line or at least pay for a static IP. Some people will set up a home computer to do this but you will want reliability for a business. Unless you are just wanting to do this for the fun of it, I would really suggest paying for hosting. It would be cheaper and easier. Drupal or WordPress would be good options and I know WordPress even offers custom domain options. And there are dozens of other companies that offer hosting - often for less than $10 a month. That would be cheaper than paying for a business internet line and a heck of lot easier. I think that is the most practical approach anyway though arguably not as fun (assuming you find hacking computers fun).

If you really want to set up your own server, I would suggest hiring someone local to help. Send an email to your LUG or Ubuntu Loco. I'm sure there are some in your area looking for side jobs. I kind of doubt you will get all the info you need for a project of this magnitude on the Answers site (no offence to all the great people answering). Otherwise, you will probably need to buy and read a big fat "become a web admin" type book.

Sorry that's not really an answer to your question but having followed several of your questions around this topic I think it's a more simple and practical approach.

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

Sadly I'm a little inclined to agree......though I love a challenge this is far more than a mere challenge - it's a completely different way of thinking and operating, one which clearly requires an enormous length of time and material and practice in order to make function correctly.

I'm still willing to try of course!! But I simply need understanding not only of the technology but of the language itself - without proper understanding of the language everything becomes a hopeless trainwreck, doesn't it.

I don't know what it means to send an email to my LUG or Ubuntu Loco? Last I heard, a Lug was what held the wheel on my car and a Loco is a train. Are these new computer terms related to Ubuntu?

I'll mark this problem as "solved" although it's not really solved.....I just don't want this question and the frustration to be cleaned up by the launchpad janitor. Then future users can see the same answers I received and not experience so much waste of time searching for understanding.

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

Thanks Jim Hutchinson, that solved my question.

Revision history for this message
Jim Hutchinson (jphutch) said :
#13

Sorry, it's easy to get caught up in jargon. A LUG in the Linux world is a Linux Users Group. Ubuntu takes it a step further and has sponsored Local community teams dubed LoCo (for local community). Here is a list of official teams (not sure how updated it is) https://wiki.ubuntu.com/LoCoTeamList. There is a Canada team (iirc you are in Canada). However, Canada is a big country so I don't know if they have that broken down by regions or what. Perhaps just sending an email to the list introducing yourself and asking for info would be a good start. Judging by their archive they are fairly active https://lists.ubuntu.com/archives/ubuntu-ca/. You can join the mailing list at https://lists.ubuntu.com/mailman/listinfo/ubuntu-ca. If you don't join your message will have to be approved and you might miss replies. I would bet that you will find some good help on the list and maybe even some people in your area to meet up with from time to time.