don't understand directory structure

stndn

Golden Member
Mar 10, 2001
1,886
0
0
i tried the second link and got this error:

Not Found
The requested URL /cgi-bin/ace/counter.cgi was not found on this server.

are you sure you put the script in the correct directory?
(there's an error when i try to see the contents of "ace" directory, but no error inside "counter" directory)

you don't need to chmod 777 to your directory (unless you plan to let someone else upload or create files in it). all you need is chmod 777 filename that you want the user to be able to modify (eg: counter)
you only need read/execute permission for the directory (chmod 755)

anyways, have you tried putting the counter.cgi script from "ace" inside "counter", and see if it will run? and vice versa?
 

crazychicken

Platinum Member
Jan 20, 2001
2,081
0
0
hey,
i got my counter working yay!

i have another *nix problem if ya got a second

http://www.bandtank.com/secret/login.html

the idea is to pw protect the /secret directory, so that when you login it goes to /secret/index.html

now here is the problem

on this server......
i have a dir /home/bandtank/mainwebsite_html/secret
but that is really (is this right?) /var/www/html/secret

what is the difference between these?

also, when i run a perl script called "pathtest.pl" it says some thing about /virtual/f45/otherstuff

i am confused on this directory structure.

any info would be greatly apprectiated.

thanks
david
 

stndn

Golden Member
Mar 10, 2001
1,886
0
0
it's the way the web server setup the apache settings and file/directory structure settings
this is how most web hosting service setup their server so they can used shared space for all their clients...

i tried going to the links you posted (login.html), and based on your note, the directory structures are different depending on how you view it

so, basically everything that you put under /var/www, will be seen as the root directory (instead of http://www.bandtank.com/var/www/) for people looking through the web browser... /var/www is only visible when you get there directly.

you may have to try figuring how your pathtest.pl relate to your /var/www directory
it's better to use relative path than absolute path

i don't know how it is in your server setting, but here's an example on my webhost (iicinternet):
i have $home/domaincgi/script.pl and $home/myOwnDirectory/somefile.txt
i also have $home/www/index.html (and people will just see it as website.com/index.html, without the www)

inside my script, if i want to access index.html, i will use "index.html" instead of "../index.html".
however, if i want to access "somefile.txt", i use "../myOwnDirectory/somefile.txt" instead of "somefile.txt"

why? i have no idea... but that's how they setup the web server to see the other files...

so, to answer your question, the way your scripts can see the files in other directories depends on which file you're looking for (whether it's inside separate directory or under your www directory), as well as how your webhost server is set up...

probably not the best explanation you can get, but .... that's all i can think of for now ...