Sample Header Ad - 728x90

can't browse to subdomain on apache server, getting forbidden resource permission

0 votes
1 answer
609 views
I have cPanelA with website A...with subdomain A1 - all is working correctly. I have created a new cPanelB with website B...and need to move subdomain A1 over to cPanel B as subdomain B1. Website B is working...but after copying all of subdomain A1 over to cPanel B, I can't get subdomain B1 to work. It keeps returning Forbidden - you don't have permission to access this resource In cPanelB, I have verified all the file/directory ownerships are correct. I verified all the file permissions are correct (0644 on files and 0755 on directories). I verified PHP is enabled for the new cPanel (via WHM). After more than an hour of frustration - I then verified subdomain B1 file structure/permissions/ownership were identical to those on subdomain A1. I copied the .htaccess files from website A and subdomain A1 over to website B and subdomain B - and then changed any domain references to the new B sub/domain. So I don't think its my .htaccess files...they actually seem to be working because the root /www/.htaccess file has a rewrite to point to the subdomain folder /www/club and I can see in the browser that its actually making it to the subdomain B. I know this is probably going to be something tedious but I am all out of ideas on what the issue could be. www/.htaccess: Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} ^api\. [NC] RewriteRule !^api/ api%{REQUEST_URI} [L,NC] // api.domainB.com RewriteCond %{HTTP_HOST} ^portal\. [NC] // portal.domainB.com RewriteRule !^club/ portal%{REQUEST_URI} [L,NC] Options -Indexes SetEnvIf X-Rquested-With com.domainB domainB #AddType application/x-httpd-php7 .html .htm ErrorDocument 404 https://www.domainB.com/errorpage.html # file upload info DirectoryIndex index.html index.htm index.php AddHandler application/x-httpd-ea-php73 .php .html .htm .phtml # php -- BEGIN cPanel-generated handler, do not edit # Set the “ea-php73” package as the default “PHP” programming language. AddHandler application/x-httpd-ea-php73 .php .php7 .phtml # php -- END cPanel-generated handler, do not edit www/club/.htaccess for: portal.domainB.com RewriteEngine On RewriteCond %{HTTP_HOST} !^portal\. [NC,OR] RewriteCond %{HTTPS} off RewriteRule ^ - [F] #AddType application/x-httpd-php5 .html .htm DirectoryIndex index.html index.htm index.php Header set Access-Control-Allow-Origin "*" AddHandler application/x-httpd-ea-php73 .php .html .php7 .phtml ErrorDocument 404 https://portal.domainB.com/errorpage.html # php -- BEGIN cPanel-generated handler, do not edit # Set the “ea-php73” package as the default “PHP” programming language. AddHandler application/x-httpd-ea-php73 .php .php7 .phtml .html # php -- END cPanel-generated handler, do not edit
Asked by rolinger (175 rep)
Sep 25, 2020, 04:20 AM
Last activity: Sep 25, 2020, 11:58 AM