SOLVED Changing root document

necsa

Member
Jun 8, 2022
6
0
1
ksa
cPanel Access Level
Website Owner
Hi There,
I'm using magento 2 installed on apache 2.4. However I'm trying to change root path to /pub instead of /public_html.
I've seen many topics but it doesn't work with me !
When I try to change the root my website entirely down!! and I received the following error :
no input file specified.

Could you please advise what I have to do.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
10,924
1,718
363
cPanel Access Level
Root Administrator
Hey there! You'd likely need to change the document root for the cPanel account itself. Details on how to change this in cPanel can be found here:


What you don't want to do is follow the common guide like this one:


as cPanel handles the Apache configuration completely differently, and those types of changes will not work.

Can you try editing the cPanel document root to see if that gets things working how you expect?
 

necsa

Member
Jun 8, 2022
6
0
1
ksa
cPanel Access Level
Website Owner
Hey there! You'd likely need to change the document root for the cPanel account itself. Details on how to change this in cPanel can be found here:


What you don't want to do is follow the common guide like this one:


as cPanel handles the Apache configuration completely differently, and those types of changes will not work.

Can you try editing the cPanel document root to see if that gets things working how you expect?
Hi,
Unfortunately it doesn't work, same error appear.
 

necsa

Member
Jun 8, 2022
6
0
1
ksa
cPanel Access Level
Website Owner
Hi Dear,
I found the following error :

[proxy_fcgi:error] [pid 25878] [client 185.93.228.5:52334] AH01071: Got error 'Unable to open primary script: /home/nectarksa/public_html/pub/index.php (No such file or directory)', referer: Google