Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Firstly, I admit I am a Linux / Apache nOOb, so I would really appreciate it if your answers are in plain English (smile)

Is the apache localhost server available to all Linux accounts?

If I use my Linux admin account to set up a web app in the /var/www/ directory, can people logged into other Linux accounts use that web app too by just typing in http://www.localhost/ in their web browsers?

(I am talking about people who are at that computer, not people trying to access it over the internet).

The Scenario:

I will be setting up a web-based Point Of Sale (pos) system on a computer at one of our brick and mortar retail stores. (There is not internet access there).

There will be two LINUX user accounts on that computer. One for me (the administrator) and one for the Sales People ("Sales").

So how should I set up apache so that the sales people can login to the Linux "Sales" user account and use the web-based app?

By default, if the web app files are in the /var/www/ directory, can all Linux user accounts browse them in their web browsers just by going to http://localhost/

Or do I need to do something else? (like set up a public_html directory ???)

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Quick answer: Yes. Once you install apache and configure it, all users will be able to access it at http://localhost (no www).

If you want different accounts accessing different pages, you should configure that on the web app itself. Just have your users log in with a username and password and write your app to react accordingly. The webserver has no knowledge of your username on the machine, it just receives whatever data you give it from the webpage.

share|improve this answer
    
Thank You for your help (even though stack exchange says NOT to use the comments section to say thank you). ~~~~ Two follow up Questions: 1) Should I make a public_html folder in my (admin user) directory? (are there any benefits to having the app in public_html instead of /var/www/) 2) If I DO put the app in /public_html/ can other users still browse / use that web app when going to http:// localhost Thanks in advance. –  Ow That Hurts Oct 4 '13 at 17:14
    
The ~/public_html is just a convention, it is used on multi-user systems to allow normal users to post content online. There is absolutely no reason to do this unless you want your (linux) users to each have their own webpage accessible under localhost/~username. If I understand what you want to do correctly, all you need to do is set up localhost and then write a web app that logs in your users. –  terdon Oct 4 '13 at 17:27
    
Ok, I get it now. You are correct; I just want the one location (under /localhost/ ) and all the Linux users to be able to access that ONE web app (and that web app will have a username / password verification system built into the web app itself). So thank you, and I will just keep everything in the /var/www/ directory. –  Ow That Hurts Oct 4 '13 at 17:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.