How To Access Password Protected File Via Curl
Nov 19, 2007
I've got a file I want to access via cURL that is within a password protected directory.
I've tried sending:
Code:
$headers = array(
"HTTP_AUTH_LOGIN: admin3e",
"HTTP_AUTH_PASSWD: opensesame",
"Content-Type: text/html"
);
curl_setopt($curl, CUROPT_HTTPHEADER, &$headers);
(insecure)
and:
Code:
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, '[user]:[pass]');
but I can't figure out how to get past the login:
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.52 (CentOS) Server at ****** Port 80
View 3 Replies
ADVERTISEMENT
Feb 17, 2008
A client wants to FTP some files to my server but I don't want him to see/have access to all the other stuff on the server. Is there a way that I can 'corden-off' an area for him to FTP stuff to? A password protected area perhaps?
View 2 Replies
View Related
Dec 16, 2007
I was wondering if it would be advisable to use the Password Protected Directory option in cPanels to limit part of my website to no more than 1,000 paying customers (yearly subsciption). Can cPanels handle this? Would accessing .htaccess and .htpassword to authenticate be too slow? Would management become too much? Has anyone attempted this? Are there any good alternatives such as open source programs? I've looked and found a few that are expensive and do way more than what I need.
View 2 Replies
View Related
Mar 22, 2007
I have 2 domains on 1 account. My main website is www.aviationcafe.net and i added on www.modelcuir.com thats what it looks like to the public. But with my host it will be www.modelcuir.aviationcafe.net.
I noticed in the files area that modelcuir is it's own file, i can password protect that but it will stop people getting onto the website completly and i only want to stop them getting into the members area.
I can't create a members area either unless i can add a new folder which i can't i dont think.
View 2 Replies
View Related
Aug 7, 2014
I have been trying to get password protected directories working on my Linode server. It works / behaves in a desktop browser somewhat but not like I am used to with hostmonster. Also for some reason my phone (windows phone just loads the page in the protected directory without prompting for a password. So I imagine there is some security thing I am missing that none of the info I have found searching talks about. Here is what I have done. I have created a password file and set the permissions correctly on that and it works on the desktop. However when I close the browser or open a private browsing session I am never prompted for a password again. It just feels insecure. Plus my windows phone just loads the page with no prompt. With hostmonster if I closed the browser window it would ask me for the username and password again. I also tested hostmonster directory passwords on my phone and it prompts for a username/password.
Here is what I have added to the apache2.conf file. The rest is pretty much default. There is no .htaccess file for that directory.
<Directory "/var/www/protected">
AllowOverride All
AuthType basic
AuthName "Enter Login"
AuthUserFile /etc/htpasswd/.htpasswd
Require valid-user
Order deny,allow
Allow from user1
</Directory>
It may be worth noting that I have two virtual sites / domain names running on this server at the moment however the one that is being used for this is the primary domain name.
OS: Debian 7.3
Apache 2.2.22
View 6 Replies
View Related
May 24, 2014
On Plesk 11.5 / Centos 6.5 / Linux
I normally protect a given directory in the Plesk Contral Panel with a Username / Password. I would like to bypass the username and password for visitors from one IP.
View 3 Replies
View Related
Oct 16, 2014
Plesk 11.5.30 Update #47
When I look in a directory password protected by the Plesk Panel, I don't see an .htaccess file...
So, how does Plesk password protect directories?
And, is it possible to add functionality that would limit number of login attempts, and block an offending IP for a period of time?
View 2 Replies
View Related
Jul 7, 2007
<?
function usecurl1($url)
{
$ch = curl_init();
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_URL, $url );
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/1.6");
$output['html'] = curl_exec ( $ch );
$output['opt'] = curl_getinfo ($ch);
curl_close($ch);
return $output;
}
function usecurl($url)
{
$output=usecurl1($url);
return $output['html'];
}
$output=usecurl1("http://en.wikipedia.org/wiki/Special:Random"); //doesn't work
print_r ($output);
echo '<br>';
$output=usecurl1("http://yahoo.com"); //works
print_r ($output);
?>
View 6 Replies
View Related
Nov 3, 2009
How do you open custom ports for fetching content from a url via a non-standard port, ex [url]:32626 ... (url has 32626 opoen)
View 2 Replies
View Related
May 2, 2008
I access whm from my pda via this method as told by cpanel's DavidG from support
[url]
However, there is no remember me option. I'm using Opera Mobile on my HTC Touch and really need some sort of remember me option. Opera mobile (or mini) do not have the wand function either. IE doesn't have any such feature either.
View 0 Replies
View Related
May 29, 2008
How can change mysql root password with ssh access?
View 6 Replies
View Related
Jun 10, 2008
I'm trying to allow part of a website to be secure and prompt for a password that can be access by a user/password.
I'm running Win 2003 server and IIS 6.0
I have my website running fine.
This is what I wanted to do. Allow the main page to be accessed by all.
Part of the site needs to be secure and allow access to people only with a password.
I thought I would be able to do this by creating a user with a password on the windows machine just like I have created users with FTP accounts that are logging in and using the FTP service fine.
However, when I limit access to the folders. When I try to access it by internet it comes up with a user/pass box as I thought it would, but when I try to access it with the user/pass for a user that can auth fine for the win FTP service it doesn't accept it.
how I can do this in IIS to allow secure access to part of a site and allow them to auth to login to part of the site only ?
View 0 Replies
View Related
May 17, 2008
I have created a password file in /root/passw.txt
then run command
rsync -ave 'ssh -p 1234' --password-file=/root/passw.txt admin@10.0.0.10:/home/admin/backups/* /backups
But it still asks for the password. How can I fix it?
View 3 Replies
View Related
Sep 22, 2007
I am trying to setup rsync connection between servers by using this
Code:
rsync -avWe ssh * user@destination-ip:/path/to-folder --password-file=/root/rsync_pass
but it keeps asking for the password. In the /root/rsync_pass, I just put the password of user in destination server. Why cant rsync read the password file? Is there any specific syntax for it?
View 5 Replies
View Related
May 28, 2007
im trying to password protect a single txt file on my server, but instead its password protecting the whole directory
so for example
i want to password protect the file 123.txt in directory "sample" but instead its password protecting the whole direcoty "sample"
View 10 Replies
View Related
Jan 16, 2015
I would like my entire website to be password protected except for one file called allowThisFileWithoutPassword.php.
How could this be accomplished. Below is my attempt :
Code:
<VirtualHost *:80>
ServerName example.com
ServerAlias *.example.com
# ServerSignature Off
ErrorDocument 404 /error-404.html
DocumentRoot /var/www/html
<Directory "/var/www/html">
[Code] .....
View 2 Replies
View Related
Jun 20, 2009
I get the following error when let my site connect to my database: Access denied for user 'apache'@'localhost' (using password: NO)
But when im running lil test script which connect to my localhost with the same passwords and it gives the status 'Connection OK' (im running on admin account, made a MySQL account with DA)
Code:
<?php $link = mysql_connect('localhost','admin_removed','removed'); if (!$link) { die('Could not connect to MySQL: ' . mysql_error()); } echo 'Connection OK'; mysql_close($link); ?>
View 2 Replies
View Related
May 25, 2014
When I tried access parallels plesk panel 11.5 ... It's show windows password, if i enter Administrator credentials i see login of parallels, if i cancell i receive this error: "401 - Unauthorized: Access is denied due to invalid credentials."
I also tried use reconfigurator but i receive this error on attach 2...
View 2 Replies
View Related
Jul 12, 2009
Im trying to setup a mysql server on my centos vps server. Ive installed mysql server and done chkconfig and the mysql server has started. My problems start when i want to set a mysql root password.
Quote:
mysqladmin -u root password yourrootsqlpassword
mysqladmin -h server1.example.com -u root password yourrootsqlpassword
I get an error "ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)"
Which i totally dont understand because why would it want a password when im trying to set the password?
View 6 Replies
View Related
May 30, 2007
I'm trying to set up Apache on CentOS 4. I'm using Apache 2.0 and it can't seem to access anything outside of the /var/www directory - it gives an Error 403.
I thought this would be down to SELinux but this is disabled. I've run the following command on the directory but with no luck:
Code:
chown apache /home/jmaskell -R
View 7 Replies
View Related
May 11, 2007
if there's an OS where that is possible?...i'm probably in the wrong section at this point, but i was thinking about using Remote Desktop to accomplish this...something like a Virtual Private Network... but i don't have XP pro or any other system that could act like a server...
my goal is to allow staff working off site to easily access files through windows programs like ms word or ms excel to save, edit, etc -- files would be located on the web server or on a network computer on site (not necessarily a network server)
View 4 Replies
View Related
Jul 22, 2007
I'm running into a strange problem. I've copied this code from rentyourdot.com and it uses curl and also file_get contents. I keep seeing this:
Warning: include() [function.include]: URL file-access is disabled in the server configuration in
Now i have access to change anything on the server, and both these are set to on in phpinfo.
allow_url_fopen = On
allow_url_include = On
I also have another script that uses file_get_contents to get a remote url and its working fine. Any clue why its even coming up with that error?
View 1 Replies
View Related
May 19, 2009
I am using port 81.
I can access all the files without any issue.
Until today when I check the flv file on other machine,
[url]
It say 404 no found!
I can access other *.jpg *.html file without any problem, but no flv file.
I thought it's firewall issue, but even I turn off firewall, it's still having the same issue.
And I have another computer in the same network, it's fine. they are all windows XP.
View 5 Replies
View Related
Feb 22, 2007
I have a file on my server called admin.php and a folder called "admin" I only want 2 IP addresses to be allowed access to those files.
can this be done in .htaccess? if so can someone give me an example?
I have spent ages trying to work it out myself but I'm a bit of a noob
thanks in advance
what should .htaccess files be chmod'ed to ideally?
View 2 Replies
View Related
Sep 6, 2007
I'm getting an error when I try to allow apache access a mount nfs folder...
View 4 Replies
View Related
Feb 18, 2007
I have download manager script that I use for my customers to download products right after the purchase.
Script generates download link that looks like this:
http://www.yourwebsite.com/download/...582921B&p=1840 (where 2YY6582921B is receipt number that is different with each purchase).
All products are placed in one folder. This folder can not be seen in above download url, but can be accessed thru browser and files can be downloaded that way without paying for them.
Can I use .htaccess and if yes how, to protect all product files the way that they can not be accessed directly by visiting url thru browser (in case somebody will find the correct url), they should be allowed for access only for my download manager script.
View 3 Replies
View Related
May 22, 2009
if i can lock a file from being downloaded or viewed in ftp editor even if i give some one ftp access?
View 3 Replies
View Related
Nov 18, 2007
How big can Apache access log file be withouth degrading the performance of a solid VPS solution with 764MB RAM?
I want to have it as big as it gets withouth seriously degrading the performance...
View 1 Replies
View Related