Estoy intentando mover mi directorio home de apache (/var/www/html) al directorio home de mi usuario (/home/lair). modifiqué los archivos de configuración de apache para que apuntaran a esa ruta, quedando así:
/etc/httpd/conf/httpd.conf
Cita:
/etc/httpd/conf.d/localhost.confDocumentRoot "/home/lair/Public"
Cita:
Los permisos que estoy asignando son:<VirtualHost *:80>
ServerName localhost
#Redirect permanent / https://localhost
DocumentRoot /home/lair/Public/localhost/html
ErrorLog /home/lair/Public/localhost/log/error.log
CustomLog /home/lair/Public/localhost/log/access.log combined
</VirtualHost>
<VirtualHost *:443>
DocumentRoot /home/lair/Public/localhost/html
ServerName localhost
ErrorLog /home/lair/Public/localhost/log/error.ssl.log
CustomLog /home/lair/Public/localhost/log/access.ssl.log combined
SSLEngine on
SSLCertificateFile /home/lair/Public/localhost/certificate/localhost.crt
SSLCertificateKeyFile /home/lair/Public/localhost/certificate/localhost.key
<Directory /home/lair/Public/localhost/html>
AllowOverride All
</Directory>
ServerSignature Off
</VirtualHost>
ServerName localhost
#Redirect permanent / https://localhost
DocumentRoot /home/lair/Public/localhost/html
ErrorLog /home/lair/Public/localhost/log/error.log
CustomLog /home/lair/Public/localhost/log/access.log combined
</VirtualHost>
<VirtualHost *:443>
DocumentRoot /home/lair/Public/localhost/html
ServerName localhost
ErrorLog /home/lair/Public/localhost/log/error.ssl.log
CustomLog /home/lair/Public/localhost/log/access.ssl.log combined
SSLEngine on
SSLCertificateFile /home/lair/Public/localhost/certificate/localhost.crt
SSLCertificateKeyFile /home/lair/Public/localhost/certificate/localhost.key
<Directory /home/lair/Public/localhost/html>
AllowOverride All
</Directory>
ServerSignature Off
</VirtualHost>
chmod 775 y chown lair:apache
Asigné permisos a home así:
[root@localhost /]# ll
Cita:
dentro de home:drwxrwxr-x. 3 lair apache 17 Aug 12 2015 home
[root@localhost /]# ll /home/
Cita:
dentro de lair así:drwxrwxr-x. 71 lair apache 4096 Aug 22 11:54 lair
[root@localhost /]# ll /home/lair/
Cita:
y dentro de public se encuentra cada desarrollo bajo el siguiente esquema:drwxrwxr-x. 10 lair apache 4096 Aug 22 10:38 Public
Cita:
[root@localhost /]# ll /home/lair/Public/localhost/drwxrwxr-x 5 lair apache 45 Aug 22 10:17 localhost
Cita:
Cuando entro al sitio (localhost o cualquier otro host) me muestra la página por defecto de CentOS (no index)drwxrwxr-x 2 lair apache 46 Aug 22 10:17 certificate
drwxrwxr-x 11 lair apache 4096 Aug 22 10:17 html
drwxrwxr-x 2 lair apache 129 Aug 22 10:17 log
drwxrwxr-x 11 lair apache 4096 Aug 22 10:17 html
drwxrwxr-x 2 lair apache 129 Aug 22 10:17 log
https://www.dropbox.com/s/wv47dh6fyh...11-15.png?dl=0
En el log del vhost veo qu la petición "/" marca un 403:
Cita:
y si intento acceder a alguna carpeta tambien retorna un 403::1 - - [22/Aug/2016:11:58:57 -0500] "GET / HTTP/1.1" 403 4897 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36"
::1 - - [22/Aug/2016:11:58:57 -0500] "GET /noindex/css/bootstrap.min.css HTTP/1.1" 304 - "http://localhost/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36"
::1 - - [22/Aug/2016:11:58:57 -0500] "GET /noindex/css/open-sans.css HTTP/1.1" 304 - "http://localhost/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36"
::1 - - [22/Aug/2016:11:58:57 -0500] "GET /images/apache_pb.gif HTTP/1.1" 304 - "http://localhost/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36"
::1 - - [22/Aug/2016:11:58:57 -0500] "GET /images/poweredby.png HTTP/1.1" 304 - "http://localhost/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36"
::1 - - [22/Aug/2016:11:58:57 -0500] "GET /favicon.ico HTTP/1.1" 403 213 "http://localhost/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36"
::1 - - [22/Aug/2016:11:58:57 -0500] "GET /noindex/css/bootstrap.min.css HTTP/1.1" 304 - "http://localhost/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36"
::1 - - [22/Aug/2016:11:58:57 -0500] "GET /noindex/css/open-sans.css HTTP/1.1" 304 - "http://localhost/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36"
::1 - - [22/Aug/2016:11:58:57 -0500] "GET /images/apache_pb.gif HTTP/1.1" 304 - "http://localhost/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36"
::1 - - [22/Aug/2016:11:58:57 -0500] "GET /images/poweredby.png HTTP/1.1" 304 - "http://localhost/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36"
::1 - - [22/Aug/2016:11:58:57 -0500] "GET /favicon.ico HTTP/1.1" 403 213 "http://localhost/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36"
Cita:
https://www.dropbox.com/s/vkowdlk7s1...14-08.png?dl=0[root@localhost html]# pwd
/home/lair/Public/localhost/html
[root@localhost html]# ll
total 1480
drwxrwxr-x 3 lair apache 4096 Aug 22 10:17 composer
drwxrwxr-x 4 lair apache 51 Aug 22 10:17 htaccess
-rwxrwxr-x 1 lair apache 155 Aug 22 10:17 iframe.html
-rwxrwxr-x 1 lair apache 19 Aug 22 10:17 index.php
drwxrwxr-x 3 lair apache 4096 Aug 22 10:17 migraciones
drwxrwxr-x 3 lair apache 76 Aug 22 10:17 stream
drwxrwxr-x 2 lair apache 75 Aug 22 10:17 upload
/home/lair/Public/localhost/html
[root@localhost html]# ll
total 1480
drwxrwxr-x 3 lair apache 4096 Aug 22 10:17 composer
drwxrwxr-x 4 lair apache 51 Aug 22 10:17 htaccess
-rwxrwxr-x 1 lair apache 155 Aug 22 10:17 iframe.html
-rwxrwxr-x 1 lair apache 19 Aug 22 10:17 index.php
drwxrwxr-x 3 lair apache 4096 Aug 22 10:17 migraciones
drwxrwxr-x 3 lair apache 76 Aug 22 10:17 stream
drwxrwxr-x 2 lair apache 75 Aug 22 10:17 upload
¿Hay algo que se me esté pasando o adicional que necesito hacer?
gracias por tomarse el tiempo, saludos.