LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to publish folders & sub folders on http server (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-publish-folders-and-sub-folders-on-http-server-890006/)

ananthkadalur 07-05-2011 06:39 AM

How to publish folders & sub folders on http server
 
Hi......everybody, I am working as a Linux Administrator since few months. I have done network based installation in cent, fedora & RHEL using NFS & FTP. But I wanted to do the network installation with also http. I don't know how to set up http server. I am keeping Cent OS DVD content in /var/ftp/pub folder. So if I type http://192.168.0.100 or http://192.168.0.100/var/ftp/pub(I am not sure) it should show the directories and subdirectories. But I don't know how to configure http server. I am struggling for this since so long. I request you, kindly help me regarding this.

Regards
Ananth

vinaytp 07-05-2011 07:08 AM

Hi

Just Create a directory under /var/www/html say Centos, as it is default DocumentRoot for sharing your installation media.

As you have kept the Installable at /var/ftp/pub. Just create a soft link from /var/ftp/pub to /var/www/html/Centos.

Code:

ln -s /var/ftp/pub /var/www/html/Centos
Thanks,

TB0ne 07-05-2011 09:19 AM

Quote:

Originally Posted by vinaytp (Post 4405567)
Hi
Just Create a directory under /var/www/html say Centos, as it is default DocumentRoot for sharing your installation media.

As you have kept the Installable at /var/ftp/pub. Just create a soft link from /var/ftp/pub to /var/www/html/Centos.
Code:

ln -s /var/ftp/pub /var/www/html/Centos
Thanks,

Sorry, but this is incomplete advice.

Unless Apache has been set up to explicitly allow symlinks, making one as you suggested won't work, since Apache won't follow it (for security reasons). Also, the DirectoryIndex directive has to be set to point to the folder(s), to allow a listing to be made at ALL, even if symlinks are allowed.


All times are GMT -5. The time now is 10:26 AM.