Jago6060 Posted October 17, 2007 Share Posted October 17, 2007 I'm very new to linux. I have a project that I'm working on and I'm not entirely sure where to start. Here is my task. "Using Apache, install a secure (encrypted) using ** Apache's (passworded) WWW server that will only allow Tom and Harry with a password of test to access documents on the server. (Any OS). I suggest open SSL.... ** PHP or other password scripts are NOT acceptable." I'm doing this on Slackware 11. I also have Slax Server if anyone thinks it would be easier to do this task on there. Any help would be greatly appreciated! Quote Link to comment https://forums.phpfreaks.com/topic/73695-solved-incredibly-lost/ Share on other sites More sharing options...
effigy Posted October 17, 2007 Share Posted October 17, 2007 Are you new to Unix as well? If so, this may prove a daunting task until your familiarize yourself with the Unix basics. What have you tried? Have you went through the docs? SSL: http://httpd.apache.org/docs/2.2/ssl/ Authentication: http://httpd.apache.org/docs/2.2/howto/auth.html Quote Link to comment https://forums.phpfreaks.com/topic/73695-solved-incredibly-lost/#findComment-371826 Share on other sites More sharing options...
Jago6060 Posted October 17, 2007 Author Share Posted October 17, 2007 Yes, I'm actually starting on linux, slackware is the only distro I've used thus far. I can do basic things like OS setup, partitioning, and I've done packet forwarding in the past but thats about it. I had looked on www.apache.org but I wasn't entirely sure what I needed to be looking for. Quote Link to comment https://forums.phpfreaks.com/topic/73695-solved-incredibly-lost/#findComment-371829 Share on other sites More sharing options...
steviewdr Posted October 20, 2007 Share Posted October 20, 2007 I think "slapt" is the package manager for slackware. Is apache on the server? If not -> slapt-get install apache2 To get apache with ssl, you'll have to do something like: slapt-get install libssl Is htpasswd installed/working? Apache may need to be installed for this tool to be available. -steve Quote Link to comment https://forums.phpfreaks.com/topic/73695-solved-incredibly-lost/#findComment-374057 Share on other sites More sharing options...
Jago6060 Posted October 20, 2007 Author Share Posted October 20, 2007 I'm using Slackware 11 so apache is already installed and started and has ssl. htpasswd works Quote Link to comment https://forums.phpfreaks.com/topic/73695-solved-incredibly-lost/#findComment-374264 Share on other sites More sharing options...
derwert Posted October 21, 2007 Share Posted October 21, 2007 Read this and that should get you going: http://weavervsworld.com/docs/other/passprotect.html Quote Link to comment https://forums.phpfreaks.com/topic/73695-solved-incredibly-lost/#findComment-375092 Share on other sites More sharing options...
Jago6060 Posted October 24, 2007 Author Share Posted October 24, 2007 thank you so much for that tutorial, it's the best one I've seen. My next question is how do I go about testing and making sure this works? I put my .htaccess file in my /var/www folder to protect those files and it's sub-directories, and I have my .htpasswd file in /usr/local. Quote Link to comment https://forums.phpfreaks.com/topic/73695-solved-incredibly-lost/#findComment-377283 Share on other sites More sharing options...
effigy Posted October 24, 2007 Share Posted October 24, 2007 When browsing to that directory, its subdirectories, or files, you should get a pop-up requesting a user name and password. Quote Link to comment https://forums.phpfreaks.com/topic/73695-solved-incredibly-lost/#findComment-377288 Share on other sites More sharing options...
Jago6060 Posted October 24, 2007 Author Share Posted October 24, 2007 I don't get any popup when I browse with any of the computer's users. I don't know if it makes a difference but I restarted httpd just in case that was hindering anything. .htaccess and .htpasswd do not need to be in any specific directory right? .htaccess just needs to be in the file it's going to protect? here is the contents of my .htaccess file AuthUserFile /usr/local/passwords/.htpasswd AuthType Basic AuthName Protected Require valid-user I have 2 users, Tom and Harry, who are supposed to be the only ones with access to the files is the /var/www folder Quote Link to comment https://forums.phpfreaks.com/topic/73695-solved-incredibly-lost/#findComment-377305 Share on other sites More sharing options...
effigy Posted October 24, 2007 Share Posted October 24, 2007 .htpasswd, no. The .htaccess file should reside in the directory that it applies to. Also, make sure overrides are allowed. Quote Link to comment https://forums.phpfreaks.com/topic/73695-solved-incredibly-lost/#findComment-377306 Share on other sites More sharing options...
Jago6060 Posted October 24, 2007 Author Share Posted October 24, 2007 so I just need to add a line that says AllowOverride All Correct? And does it matter where the line goes in .htaccess? Quote Link to comment https://forums.phpfreaks.com/topic/73695-solved-incredibly-lost/#findComment-377310 Share on other sites More sharing options...
effigy Posted October 24, 2007 Share Posted October 24, 2007 That goes in the main configuration file (unless it can actually affect .htaccess files in subdirectories--I'm not sure). All is the default, so if you don't have a line limiting the overrides, you don't need it. Double check all your Directory directives to see if they have an AllowOverride line. Quote Link to comment https://forums.phpfreaks.com/topic/73695-solved-incredibly-lost/#findComment-377312 Share on other sites More sharing options...
Jago6060 Posted October 24, 2007 Author Share Posted October 24, 2007 I have a section in my httpd.conf file that looks like this... <Directory> Options FollowSymLinks AllowOverride None </Directory> and there is also just a single line within a <Directory> block that says AllowOverride None do I change both? Quote Link to comment https://forums.phpfreaks.com/topic/73695-solved-incredibly-lost/#findComment-377315 Share on other sites More sharing options...
effigy Posted October 25, 2007 Share Posted October 25, 2007 I don't think Directory can be empty--do you mean <Directory />? Configuration differences are handled from least-specific to most. Quote Link to comment https://forums.phpfreaks.com/topic/73695-solved-incredibly-lost/#findComment-377550 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.