Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a paid web host on godaddy, I would like to know if it is possible that I use a custom port to redirect to a specific folder on the server (ex: a web mail server or a private folder)

share|improve this question
    
This question is nonsensical, sorry. –  Sirex Nov 2 '10 at 8:13
    
@Sirex - in what way? It was perfectly clear to me. –  EEAA Nov 2 '10 at 14:17
    
in that it makes no sense. custom port ? private folder ? –  Sirex Nov 2 '10 at 15:58
    
@Sirex: What I was willing to do is installing a mail server then use a specific unused port rather than 80 so that only employees use to access the mail server. –  sikas Nov 3 '10 at 21:56

1 Answer 1

up vote 2 down vote accepted

If it's a dedicated server and you have full root access (or at least access to do as you wish with apache), then sure, this should be quite simple.

Say, for instance, you wanted to associate port 8888 with a certain directory...in your main apache config file (apache.conf or httpd.conf), add:

Listen 8888
NameVirtualHost *:8888

Then add a VirtualHost:

<Virtualhost *:8080>
    ServerName foo.example.com
    DocumentRoot /path/to/directory
</VirtualHost>

I haven't tested this, so I'm not sure it's 100% correct, but it's very close, and you should be able to adapt it to your environment.

share|improve this answer
    
how can this be done? –  sikas Nov 2 '10 at 20:16
    
Edited my answer to reflect your additional question. –  EEAA Nov 2 '10 at 21:19
    
thanks, I will give it a try –  sikas Nov 3 '10 at 21:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.