You are not logged in.

#1 2017-04-23 11:30:22

ultra2mh
Member
Registered: 2017-04-20
Posts: 30

[Solved]problem : Virtual Hosts with sites-available and sites-enabled

hello .
acording this website :
(step5)
http://www.tecmint.com/install-lamp-in-arch-linux/

i did config my system webserver to use sites-available and sites-enabled and it works fine with this config:
<VirtualHost *:80>
DocumentRoot "/srv/http"
ServerName localhost
ServerAdmin you@example.com
ErrorLog "/var/log/httpd/localhost-error_log"
TransferLog "/var/log/httpd/localhost-access_log"
<Directory />
Options +Indexes +FollowSymLinks +ExecCGI
AllowOverride All
Order deny,allow
Allow from all
Require all granted
</Directory>
</VirtualHost>



but when i change *DocumnetRoot* to my home folder like "/home/myusername/web" it say to me

Access forbidden!
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
If you think this is a server error, please contact the webmaster.
Error 403

i shoud say that :
1=*web* folder have index.php file and have 777 permission.
2= adding this line =>
<Directory "/home/mohammadreza/web/">
    AllowOverride All
    Options None
    Require all granted
</Directory>

to/etc/httpd/conf/httpd.conf didnt help

when i return *DocumentRoot* to /srv/http/ it work fine again
any idea why this happen?

Last edited by ultra2mh (2017-04-23 12:02:18)

Offline

#2 2017-04-23 11:32:38

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [Solved]problem : Virtual Hosts with sites-available and sites-enabled

Does the http user have read access to your home folder?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2017-04-23 11:36:01

ultra2mh
Member
Registered: 2017-04-20
Posts: 30

Re: [Solved]problem : Virtual Hosts with sites-available and sites-enabled

how can i check that ?

Offline

#4 2017-04-23 12:01:40

ultra2mh
Member
Registered: 2017-04-20
Posts: 30

Re: [Solved]problem : Virtual Hosts with sites-available and sites-enabled

fixed by this command ::: chmod o+x ~ :thanks

Offline

Board footer

Powered by FluxBB