Results 1 to 2 of 2
Hello, I am hosted by godaddy and use linux shared hosting plan... My question is how do I get a directory viewable to the public... like a normal /pub.
I ...
- 01-29-2008 #1Just Joined!
- Join Date
- Jan 2008
- Posts
- 1
Making a directory viewable to the public...
Hello, I am hosted by godaddy and use linux shared hosting plan... My question is how do I get a directory viewable to the public... like a normal /pub.
I created a /pub directory however whenever I link to it, it seems to be looking for a html file because I get a file not found error.
Here is an example of a working /pub directory.
Index of /pub
To be more clear I created a /pub in the root directory of my server, however when I link to it I get a file not found error. I have tried setting permissions and things, seems not to work. I want it to list the files I have in /pub. =)
Thanks!
- 02-03-2008 #2
Hi,
I assume you are using Apache. If that is the case, you can do one of the following:
As root, create a "pub" directory:
You should now be able to access it.Code:# mkdir /var/www/html/pub
OR (the more tricky option)Code:http://localhost/pub

As the root user, navigate to /var/www/html
Create a soft link to your /pub directory
Set permissions for your /pub directoryCode:# ln -s /pub
Edit: I followed my own advice and ran into problems with SELinux (not sure if it applies to your distro). This is what I did to overcome that problem:Code:# chmod 755 /pub
I recommend creating /var/www/html/pub - much easier.Code:# chcon -R system_u:object_r:httpd_user_content_t:s0 pub/
If that still doesn't work, have a look at your httpd.conf file and make sure that Options Indexes FollowSymLinks is present in <Directory "/var/www/html">.
Hope that helps.


Reply With Quote
