After two full days of Googling, learning, testing, and failing repeatedly, I humbly come to this forum in search of guidance.
I use WHM on a VPS. I have two domains, lets call them primary.com and secondary.com. I need the URL secondary.com/account(.*) to display content from primary.com/account(.*) without changing the URL in the user's browser.
Initially I had a unique cPanel account established for each domain. I created a custom httpd.conf and saved it at /etc/apache2/conf.d/userdata/ssl/2/secondary/primary.conf and it contained the following:
Alias "/account" "/home/primary/public_html/account"
<Directory "/home/primary/public_html/account">
Require all granted
</Directory>
I rebuilt httpd.conf and restarted Apache. When I visited secondary.com/account I saw a Forbidden 403 error because each account had a different user and did not share the same permissions.
I then tried creating a new group and adding both users in said group, but that did not help.
I scrapped all of that and tried a new approach. I deleted the secondary.com cPanel account and then created a cPanel AddOnDomain in primary.com where secondary.com is the AddOn. I assumed this would eliminate the user permission issue, but now I don't see a /etc/apache2/conf.d/userdata/ssl/2/secondary directory and thus can not try adding a new custom httpd.conf file for secondary.com.
Can anyone suggest a solution that will allow me to display content from primary.com/account(.*) when someone visits secondary.com/account(.*) without changing the URL in the user's browser? Thank you in advance for any assistance you can provide.
P.S. - We eventually will have hundreds of unique secondary domains that will have the same relationship with the primary domain.
I use WHM on a VPS. I have two domains, lets call them primary.com and secondary.com. I need the URL secondary.com/account(.*) to display content from primary.com/account(.*) without changing the URL in the user's browser.
Initially I had a unique cPanel account established for each domain. I created a custom httpd.conf and saved it at /etc/apache2/conf.d/userdata/ssl/2/secondary/primary.conf and it contained the following:
Alias "/account" "/home/primary/public_html/account"
<Directory "/home/primary/public_html/account">
Require all granted
</Directory>
I rebuilt httpd.conf and restarted Apache. When I visited secondary.com/account I saw a Forbidden 403 error because each account had a different user and did not share the same permissions.
I then tried creating a new group and adding both users in said group, but that did not help.
I scrapped all of that and tried a new approach. I deleted the secondary.com cPanel account and then created a cPanel AddOnDomain in primary.com where secondary.com is the AddOn. I assumed this would eliminate the user permission issue, but now I don't see a /etc/apache2/conf.d/userdata/ssl/2/secondary directory and thus can not try adding a new custom httpd.conf file for secondary.com.
Can anyone suggest a solution that will allow me to display content from primary.com/account(.*) when someone visits secondary.com/account(.*) without changing the URL in the user's browser? Thank you in advance for any assistance you can provide.
P.S. - We eventually will have hundreds of unique secondary domains that will have the same relationship with the primary domain.