0

I made a copy of my entire physical project from the HD on the Mac to an external HD, however when I enter the system folder I'm receiving the 403 error, inside the system folder there is a folder called home, the same system is no problem when it is inside the physical hard drive:

Forbidden
You don't have permission to access /home/ on this server.

In the system folder, I have the following .htaccess:

RewriteEngine On

RewriteRule ^autodiscover/autodiscover.xml$ - [forbidden,last]


RewriteCond %{REQUEST_URI} !^/home
RewriteRule ^(.*)$  /home/public/v1/$1

<Files ~ "login-sistema.html$"> 
   RewriteCond %{QUERY_STRING} (loginUser|recoverUser|userCadastro)
   RewriteRule ^(.*) /home/login [forbidden,L]
</Files>


<Files ~ "\.map$">  
   RewriteRule ^(.*) /home/public/css/404.css [R=301,L]
</Files>

<IfModule mod_php5.c>
    php_flag always_populate_raw_post_data -1
    php_flag short_open_tag 1
    php_value session.auto_start 0
    php_value upload_max_filesize 280M
    php_value max_input_time 100
    php_value memory_limit 1200M
    AddType image/svg+xml svg
    AddType image/svg+xml svgz
</IfModule>


<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/map
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE image/svg+xml
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/atom_xml
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/x-httpd-php
    AddOutputFilterByType DEFLATE application/x-httpd-fastphp
    AddOutputFilterByType DEFLATE application/x-httpd-eruby
    AddOutputFilterByType DEFLATE text/html

    SetOutputFilter DEFLATE

    BrowserMatch ^Mozilla/4 gzip-only-text/html

    BrowserMatch ^Mozilla/4.0[678] no-gzip

    BrowserMatch ^HMSI[E] !no-gzip !gzip-only-text/html

    SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
</IfModule>

This is a configuration file httpd-vhosts.conf:

<VirtualHost *:80>
   ServerAdmin [email protected]
   DocumentRoot "/Volumes/HD_EXTERNO/projects"
   ServerName localtest  
   ErrorLog "logs/dummy-project-error.log"
   CustomLog "logs/dummy-project-access.log" common

    <Directory "/Volumes/HD_EXTERNO/projects">
       Options Indexes FollowSymLinks Includes execCGI
       AllowOverride All
       Satisfy Any
   </Directory>
</VirtualHost>

<VirtualHost *:80>
   ServerAdmin [email protected]
   DocumentRoot "/Volumes/HD_EXTERNO/projects/sistema/"
   ServerName local.project.com.br  
   ServerAlias www.local.project.local
   ErrorLog "logs/dummy-project-error.log"
   CustomLog "logs/dummy-project-access.log" common
   php_flag always_populate_raw_post_data -1
   setEnv APPLICATION_ENV "development"
   <Directory "/Volumes/HD_EXTERNO/projects/sistema">
       Options Indexes FollowSymLinks Includes execCGI
       AllowOverride All
       Satisfy Any
   </Directory>
</VirtualHost>

<VirtualHost *:443>
   ServerAdmin [email protected]
   DocumentRoot "/Volumes/HD_EXTERNO/projects/sistema"
   ServerName local.project.com.br  
   ServerAlias www.local.project.local
   ErrorLog "logs/dummy-project-error.log"
   CustomLog "logs/dummy-project-access.log" common
   php_flag always_populate_raw_post_data -1
   setEnv APPLICATION_ENV "development"
   <Directory "/Volumes/HD_EXTERNO/projects/sistema">
       Options Indexes FollowSymLinks Includes execCGI
       AllowOverride All
       Satisfy Any
   </Directory>

</VirtualHost>

Inside the home folder, there is the following .htaccess:

RewriteEngine On

RewriteRule ^(.*)$  /home/public/$1

And inside the public folder, .htaccess:

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]

RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::^B$
RewriteRule ^(.*)$ - [E=BASE:%1]
RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]


Options -Indexes

"I'm confident that's something related to super user permission so that I can use an external HD as a host."

3

0

You must log in to answer this question.