Warden Help  

Figuring out your "Full Host Path" & "FTP Path to Folder"

This section is under construction.  If this document doesn't help you figure out what to put into Warden, please email Drew for additional help. If you don't mind me accessing your FTP server, you can email me a saved .FUF file,  and I can correct mistakes in the file and email it back to you.


The most common configuration problem is determining the "Full Host Path" for your website and the "FTP Path to Folder" of the folder you want to protect. This page shows you how you can use a PHP, ASP, or Perl script to determine what should be entered into Warden.

 

Using Perl to Find your Full Host Path

This section assumes you have knowledge of how to upload files to your FTP server.

Create a new whereperl.pl file with the following contents:  (or, right-click and save this file)

#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "<html><head></head><body>\n";
print "Your path is working and pointing to Perl version:<p>\n";
print "<B>$]</B><p>\n";
print "The complete path to this script is:<p>\n";
print "<B>$ENV{'SCRIPT_FILENAME'}</B><p>\n";
print "The relative URL of this script is:<p>\n";
print "<B>$ENV{'SCRIPT_NAME'}</B>\n";
print "</body></html>\n";
exit; 
Log in to your FTP server using your username and password.
Note your HTML directory.  In this case, it is httpdocs.  Often,  it is public_html.
Create and/or browse to the folder you want to password-protect. In this case, the folder is called "protected"
 
Upload the whereperl.pl file to that folder and CHMOD it to 755 so it can execute.
In your web browser, go to the location where you uploaded the file.  For example, www.xnetstat.com/protected/whereperl.pl
 
As we can see from the Perl script, the complete path to the file is /home/httpd/vhosts/xnetstat.com/httpdocs/protected/whereperl.pl
To get your "Full Host Path", consider only the part you need to account for where you end up when you log in to your FTP account.
When we connected to our FTP server above, we saw the "httpdocs" folder, and later made a "protected" folder under that.  So, the full host path is 
/home/httpd/vhosts/xnetstat.com/
The "FTP path to Dir" is what comes after. In this case, it should be /httpdocs/protected/
 
Using PHP to output your Full Host Path
The same technique can be done using PHP. Create a new wherephp.php document with the following line:
<?php echo __FILE__; ?>
Upload that file to a directory and visit the URL.

As you can see, the full path to the script is /home/httpd/vhosts/xnetstat.com/httpdocs/protected/wherephp.php

 

 
 
Using ASP to output your Full Host Path
The same technique can be done with ASP.  Create a new whereasp.asp document with the following line:
<%=Server.MapPath%>
 
Repeat the steps above to figure out your Full Host path and FTP Path to Dir.

 

 


If the above does not help you figure out what to put into Warden, please email Drew for additional help.

You can save your project in Warden and email me the .FUF file. I will attempt to fix it and email you back a new file with the correct information.  To do this, I will need your consent to access a folder on your FTP server.


 

 


 


    Everything Copyright © 2005 Fresh Software LLC