Directory mapping between the FTP server and the web server


#1

Folks,

I am a new user here. I actually need to know the directory mapping between the my FTP server and the web server.

Use case: Say I have the FTP access to my FTP server and have uploaded test.html file to some directory inside it. Now I want to access the same file through browser.

Problem: I am not able to determine the directory mapping between the FTP server and the web server i.e. the HTTP path of my test.html file.

Thanks! in advance.
Saggar


#2

If you have a fully hosted domain named domain.com that uses ftp user jondoe when you login into jondoe you will be placed at /home/jondoe/ you will see a directory there called domain.com (it is created automatically when you add hosting to domain.com from the panel). Change into domain.com and upload your test.html so that your path to test.hml is /home/jondoe/domain.com/test.html and from the browser you can point to http://domain.com/test.html.

If you delete quickstart.html and rename test.html to index.html then http://domain.com will serve your test file.


#3

Thanks for your quick reply. Got the idea.

BTW, one new problem - How to disable the directory listing feature under my domain?
I mean when I point my browser to say http://xxx.com/aaa/, browser starts to show the content under that directory. I searched this on Google and found that there is some file named “.htaccess” in which “Options -Indexes” entry needs to be added, but unfortunately I don’t know the path for the same.

So any idea how to solve this too?


#4

You can do many things with .htaccess which is just a simple text file with an odd name, that is located anywhere in the file tree and affects any file or directory “below” it. .htaccess does not have to exist, and must be created when first used. You could place it in the domain.com directory.


An alternate way to dismiss the directory listing of a single directory is to put an empty file named index.html at that location of the path.[hr]
additional thought: .htaccess is typically a ‘hidden’ file. Make sure your ftp program is configured to show hidden files.