I've created a subdomain . (track.example.com)
I use direct Admin panel so I set the roots for
public : /domains/track.example.com/public_html
private : /domains/track.example.com/private_html
I copied my files to both folders above. Now when I try to load track.example.com
, It throws 403 error. what is the problem ?
( Update : when I try to load the address with HTTPS . it works fine ! )
( Update 2 : When I try to request index.php directly , The site loads fine ! )
My log : 2021-12-09 09:45:56.848516 [INFO] [16025] [151.246.223.141:23540#APVH_www.track.example.com] Auto Index is disabled for [/home/h170081/domains/example.com/public_html/track/], access denied
htaccess content :
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !=localhost
RewriteCond %{HTTP_HOST} !=127.0.0.1
RewriteCond %{REMOTE_ADDR} !=127.0.0.1
RewriteCond %{REMOTE_ADDR} !=::1
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L,QSA]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s(.*)/index\.php [NC]
RewriteRule ^ $1 [R=302,L]
ErrorDocument 404 /notfound.php
I've faced same problem before. You will need to move all of your track.example.com
content to this path : /domain/example.com/public_html/track
Also you need to remove the existing settings for subdomain and set it to default.
The reason for this is that your service provider set the allowed path to the path I mentioned.