Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-27-2014, 03:19 PM
|
#1
|
Member
Registered: Dec 2007
Location: FL, USA
Distribution: CentOS 5.3, Ubuntu 9.04
Posts: 245
Rep:
|
unable to add a folder to apache web root
I have a forder /home/username/data and I want to be able to add it to apache webroot, so I added an alias to my 000-default.conf file
Code:
Alias /data "/home/username/data"
<Directory "/home/username/data">
Order allow,deny
Allow from all
</Directory>
I added this insed the VirtualHost section... I tried to access a test.php page that I have inside /data folder, but got "Forbidden" error: Permission problem. So I gave everyone rwx permission to /data folder
Code:
chmod -R ugo+rwx data
but still I get same error. Any help appreciated
|
|
|
05-27-2014, 04:33 PM
|
#2
|
Member
Registered: Jun 2011
Distribution: redhat, CentOS, OpenBSD
Posts: 298
Rep:
|
everyone (u-g-o) is going to need at least read and execute to /home/username as well, which is not typically the case! Every situation is unique, but it is definitely NOT best practices to give rwx permissions to home directories.
HTH
|
|
|
05-29-2014, 01:43 AM
|
#3
|
Member
Registered: Mar 2013
Posts: 641
Rep: 
|
What is your distro?
Apart from virtual host configuration, are you able to open your site using IP (when virtual host is not configured) or it gives same error without virtualhost too?
Do you open your site like this.
and it gives forbidden error here.
Did you enable 'userdir' module?
|
|
|
05-30-2014, 09:44 AM
|
#4
|
Member
Registered: Dec 2007
Location: FL, USA
Distribution: CentOS 5.3, Ubuntu 9.04
Posts: 245
Original Poster
Rep:
|
Quote:
Originally Posted by eklavya
What is your distro?
Apart from virtual host configuration, are you able to open your site using IP (when virtual host is not configured) or it gives same error without virtualhost too?
Do you open your site like this.
and it gives forbidden error here.
Did you enable 'userdir' module?
|
I'm able to access the webroot through the network using ip address, but not the folder http://ipaddress/data/test.php here I'm still getting "Forbidden error".. how do you enable the userdir module?
|
|
|
05-30-2014, 01:17 PM
|
#5
|
Member
Registered: Dec 2007
Location: FL, USA
Distribution: CentOS 5.3, Ubuntu 9.04
Posts: 245
Original Poster
Rep:
|
ok, I was able to get it working... editing the userdir.conf file; however, I have another vm which I did the same procedure without editing the userdir.conf file, all I did was to add
Code:
Alias directory "/home/user/directory"
<Directory "/home/user/directory">
Order allow,deny
Allow from all
</Directory>
and this did it.... don't know why I had to edit userdir.conf file this time...
|
|
|
All times are GMT -5. The time now is 06:03 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|