I downloaded a PHP file manager service (similar to FTP) that I could use on my localhost server. I have it in a folder called "ftp". Is it possible to access that folder somehow using this format in my URL bar: http://ftp.localhost
?
-
1Titles are meant to be specific and useful. Imagine what the StackOverflow front page would look like if everyone used titles like "Not quite sure what I'm looking for" and "Please help" etc. – halfer Mar 15 '13 at 22:39
-
Your question isn't specific as to whether, on your subdomain, the files must be available _via_ FTP, or whether a file download application would suffice (with files being available via HTTP). Would you clarify? (If the latter is okay, then yes it is possible - you just need another vhost in Apache). – halfer Mar 15 '13 at 22:41
-
what do do you mean with `PHP file manager` and that it is `similar to ftp`? probably it is possible to access that with `http://whatever.you.want` but your question is to vague to answer it.. please read http://stackoverflow.com/faq and http://whathaveyoutried.com/ – lupatus Mar 15 '13 at 22:41
3 Answers
No it's not possible, you have to have installed FTP server in order to access files using FTP protocol and also you need to define subdomain "ftp.localhost" to point on FTP service.
or you can setup local domain for accessing scripts like this
Find file called hosts
on location "C:\Windows\System32\drivers\etc"
open it with notepad or any other editor that you wish. then add these lines
127.0.0.1 www.fms.dev
127.0.0.1 fms.dev
127.0.0.1 fms
fms = file manager service
Then in you Apache configuration file
"C:\apache\conf\extra"
or any other location where your Apache is installed, open file called "https-vhosts.conf"
and add these lines into it (at the end)
<VirtualHost 127.0.0.1:80>
ServerAdmin your_email@example.com
DocumentRoot e:/location/to/your/files
ServerName www.fms.dev
ServerName fms.dev
ServerName fms
</VirtualHost>
then restart Apache and you are good to go :)
Your files can be accessed through domain
www.fms.dev
orfms.dev
or justfms

- 13,597
- 4
- 37
- 55
1) The hostname may be associated to localhost or whatever else by editing "/etc/hosts" (or "C:\Windows\System32\drivers\etc\hosts" under windows)
2) You have to set-up the directory in your webserver (it depends on what webserver you have)

- 2,979
- 18
- 28
The answer to this question depends entirely on what the owner of the server allows you to do with your web space and your domain.
If you're doing it on a public web server, you'll need to talk to the hosting provider. Many providers do indeed allow you to configure sub-domains, and to point them to specific directories. They often also provider configuration tools on their control panel sites for you to set it up. However, there are also a lot of hosting providers that don't provide this option. If you're not sure, talk to them and find out what you can do.
For localhost
-- ie your own desktop machine -- you are effectively the hosting provider, so you can configure it how you like; so in theory, yes, you could do this. You'd need to configure the web server to point the ftp.localhost
subdomain at the appropriate directory, and you'd need to configure your hosts
file (or DNS) to point ftp.localhost
at the local machine.
If you don't know how to do these things, it's probably too big a topic for me to tackle here, but asking further questions here will help you through.

- 166,037
- 39
- 233
- 307