Pages: 12Next
Current Page: 1 of 2
Locking a project
Posted by: Scartie (---.cable.quicknet.nl)
Date: February 12, 2006 09:27PM

Is it posible to have more than one project in the www folder but lock it to one?

For Example:
I want nobody nosing around my whole server but only the page that i want to (maybe give a error page if they go to another).

So this is what i have, i'm hosting a forum on my WampServer, but if i let them go to my Ip then they get the main page of Wamp. But i don't want that i want them to go directly to the forum and stay there even if to go back to my Ip.

But i also want full acces to the main index page of Wamp (for self use).

What ive done now is place the forum in the root if the www folder and put the Wamp main page is a sub folder.

But isn't there a nother way to do it easyer?

Thx
Scartie

Options: ReplyQuote
Re: Locking a project
Posted by: Travis (---.hsd1.mn.comcast.net)
Date: February 12, 2006 09:40PM

use .htaccess in the areas you dont want them to be, add the file in the folder

Options: ReplyQuote
Re: Locking a project
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: February 13, 2006 03:26PM

I would move your forum to a folder above your webroot folder, such as localhost/forum. and then place an .htaccess file in your root folder to password proect your WAMP main page. This way, everyone can access your forum, but if they try to access the WAMP main page, they need a password to get access.

go to this site, it will generate an htaccess and htpaswd for you.
[www.htmlbasix.com]

Enter the user name and password you wish to use. For 'path to password file' use:
C:\apachefriends\xampp

In the 'message for popup' you can enter:
Please log in to access admin panel

now click on the 'Generate' button.

You will be taken to a page with two textboxes displaying some wired sfuff. Copy all the text from the first textbox (the one that starts with AuthType Basic) and open Notepade, and paste the text. Save the file as .htaccess and save the file in this location:
C:\apachefriends\xampp\htdocs

Now go back to the webpage, and copy the text from the bottom textbox, open Notepad again, and paste the text. Save this as .htpasswd and save it in this location:
C:\apachefriends\xampp

Now you will have password protection for you WAMP page. try to access localhost, and you will be required to enter your user id and password now. And then goto your [localhost] and notice you do not need a password to access your forum

Options: ReplyQuote
Re: Locking a project
Posted by: Scartie (---.cable.quicknet.nl)
Date: February 13, 2006 08:08PM

It's not working.

@Cyberspatium:
You are talking about Xampp or is it the same as in Wamp?

What i've done is created 2 files (using the given website) htaccess.htaccess and htpasswd.htpasswd.
Placed htaccess in my www folder en htpasswd in a folder (c:\Wamp\PassFiles)

But nothing.

Options: ReplyQuote
Re: Locking a project
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: February 13, 2006 09:51PM

oh, yeah, sorry, I have WAMP and XAMPP (from www.apachefriends.org) installed. I was using the XAMPP package for my instuctions above. sorry.

Here are the correct settings to use.

first, you can not change the names of the .htaccess and .htpasswd files. they have to be named .htaccess and .htpasswd, not htaccess.htaccess and htpasswd.htpasswd.

Put the .htaccess file in:
C:\Wamp\www

Put the .htpasswd file in:
c:\Wamp\PassFiles

The reason the .htpasswd file has to be located where it is is because if it is located in the same directory as all your webpage files, then anyone can access that file and see what your user names and passwords are. so, we move the .htpasswd file in a directory that is not acccessable to anyone on the internet.

edit the .htaccess file and change the AuthUserFile setting to:
c:\Wamp\PassFiles\.htpasswd

Now try to access your [localhost] and you will see the password promt. enter you user id and pass and you will be taken to your WAMP home page.

Options: ReplyQuote
Re: Locking a project
Posted by: Scartie (---.cable.quicknet.nl)
Date: February 14, 2006 07:14PM

Ok thanks it works now, had a little problem renaming the files, but some ms-dos skills came in handy.

Thanks

Options: ReplyQuote
Re: Locking a project
Posted by: Scartie (---.cable.quicknet.nl)
Date: February 14, 2006 07:23PM

Ehh sorry still not working, i'm getting a password missmatch in the log file, but the password i typed in is correct, what can i be doing wrong this time =S

Options: ReplyQuote
Re: Locking a project
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: February 15, 2006 12:26AM

password mismatch? can you still log in?

can post the apache access log and error logs please?

Options: ReplyQuote
Re: Locking a project
Posted by: Scartie (---.cable.quicknet.nl)
Date: February 15, 2006 07:22PM

Acces log:
192.168.1.1 - - [15/Feb/2006:19:22:40 +0100] "GET /templates/subSilver/images/folder_locked_big.gif HTTP/1.1" 304 -
192.168.1.1 - - [15/Feb/2006:19:22:46 +0100] "GET /service HTTP/1.1" 401 493
192.168.1.1 - Will Pronk [15/Feb/2006:19:22:52 +0100] "GET /service HTTP/1.1" 401 493
192.168.1.1 - Will Pronk [15/Feb/2006:19:22:55 +0100] "GET /service HTTP/1.1" 401 493
192.168.1.1 - Will Pronk [15/Feb/2006:19:24:27 +0100] "GET /service HTTP/1.1" 401 493
192.168.1.1 - - [15/Feb/2006:19:24:29 +0100] "GET /service HTTP/1.1" 401 493
192.168.1.1 - Will Pronk [15/Feb/2006:19:24:29 +0100] "GET /service HTTP/1.1" 401 493
192.168.1.1 - Will Pronk [15/Feb/2006:19:24:33 +0100] "GET /service HTTP/1.1" 401 493
192.168.1.1 - Will Pronk [15/Feb/2006:19:24:36 +0100] "GET /service HTTP/1.1" 401 493

Error Log:
[Wed Feb 15 17:23:23 2006] [error] [client 192.168.1.1] user Will Pronk not found: /service
[Wed Feb 15 19:22:52 2006] [error] [client 192.168.1.1] user Will Pronk not found: /service
[Wed Feb 15 19:22:55 2006] [error] [client 192.168.1.1] user Will Pronk not found: /service
[Wed Feb 15 19:24:27 2006] [error] [client 192.168.1.1] user Will Pronk not found: /service
[Wed Feb 15 19:24:29 2006] [error] [client 192.168.1.1] user Will Pronk not found: /service
[Wed Feb 15 19:24:33 2006] [error] [client 192.168.1.1] user Will Pronk not found: /service
[Wed Feb 15 19:24:36 2006] [error] [client 192.168.1.1] user Will Pronk not found: /service

This is it


Options: ReplyQuote
Re: Locking a project
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: February 16, 2006 12:11AM

where did you get the password mismatch error from. can you still log in?

Options: ReplyQuote
Re: Locking a project
Posted by: Scartie (---.cable.quicknet.nl)
Date: February 16, 2006 07:22PM

I can't log-in in the folder where i placed the .htacces file. I get the log-in screen, type in my login name and password, then it pops up again (the login screen) then after 3 times i get the:

Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.


--------------------------------------------------------------------------------

Apache/2.0.55 (Win32) PHP/5.1.2 Server at ****.**.com Port 81

I tried all that i could, other name, changing the / to \ in the filename.
Is there maybe a way to import it in wamp to let wamp manage the .htacces and .htpasswd files? ;-)

Hope this helps you more in finding out what i'm doing wrong

Options: ReplyQuote
Re: Locking a project
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: February 16, 2006 07:52PM

I need to see your .htaccess and .htpasswd file. For security reasons, do not post these files here, just send them to me at: cyberspatium @ gmail.com

Also, when you edit .htaccess and .htpasswd files, make sure you use Notepad, not Wordpad, MS Word, etc.

Options: ReplyQuote
Re: Locking a project
Posted by: Scartie (---.cable.quicknet.nl)
Date: February 16, 2006 11:20PM

Email send, yes i use notepad.

Options: ReplyQuote
Re: Locking a project
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: February 17, 2006 01:30AM

just replied to your email message

Options: ReplyQuote
Re: Locking a project
Posted by: DanGarion (---.socal.rr.com)
Date: March 04, 2006 07:39PM

You know I'm having this same exact problem with a password mismatch. I've tried every combination I could to get it to work.

[Sat Mar 04 10:33:59 2006] [error] [client x.x.x.x] user DanGarion: authentication failure for "/": Password Mismatch
[Sat Mar 04 10:35:58 2006] [error] [client x.x.x.x] user DanGarion: authentication failure for "/": Password Mismatch

Options: ReplyQuote
Re: Locking a project
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: March 05, 2006 04:38AM

make sure your .htpasswd file contains the encrypted password, not the plain password, or it will not work.

Options: ReplyQuote
Re: Locking a project
Posted by: DanGarion (---.dsl.irvnca.pacbell.net)
Date: March 06, 2006 07:54PM

Yeah that's the one I'm using. I guess it's not a big deal, I just have them locked and can't login, I have remote access software to get to it if I really need it, but still weird why it isn't working, because I know it should.


Options: ReplyQuote
Re: Locking a project
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: March 07, 2006 05:27AM

also make sure you save the files as .htaccess and .htpasswd, sometimes MS windows hides the file extention so you need to make sure windows does not have them as htaccess.txt and htpasswd.txt.

Options: ReplyQuote
Re: Locking a project
Posted by: DanGarion (---.com)
Date: March 07, 2006 06:33AM

Yeah I know that one too. It's weird. I get the pop up for the user/pass but it never authenticates.



Post Edited (03-07-06 06:34)

Options: ReplyQuote
Re: Locking a project
Posted by: wampfun (193.227.236.---)
Date: March 10, 2006 10:00PM

I have the same problem with wamp and user login using .htaccess file

What am I doing wrong?

Options: ReplyQuote
Pages: 12Next
Current Page: 1 of 2


Sorry, only registered users may post in this forum.