More than 1 WebApplication inside my public_html directory

abelardolg

Member
May 16, 2020
5
0
1
Madrid
cPanel Access Level
Website Owner
Hi,
I uploaded my React web application to my domain and it works fine but I would like to upload more web applications built with several technologies: Symfony, NodeJS and so on.

How could I set up my index.html/index.php and .htaccess files so they can live together with no collisions? Since only a .htaccess file can exist inside the public_html folder, I can't use it to point to several index.php/index.html.

Thanks in advance.

Best regards.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
3,186
398
243
cPanel Access Level
Root Administrator
Hey there! I'm not sure there is a good way to get this working. Much like how Wordpress uses one single index.php file, you wouldn't be able to have two of those in a single directory, so additional Wordpress installations would require a subfolder. I believe you'll run into the same issue with these applications, especially if they require .htaccess redirections to function.
 
  • Like
Reactions: abelardolg

abelardolg

Member
May 16, 2020
5
0
1
Madrid
cPanel Access Level
Website Owner
Hi there,

Thanks for your reply and for your piece of advice. :)

What would be the best approaching to have several apps with several technologies with no collisions among them?

I am using subdomains (xxx.mymaindomain.com) but I would like to have something similar like this: https://www.mymaindomain.com/itdeveloper and inside this directory to have installed a Symfony app (for example); https://www.mymaindomain.com/escritor built with React and so on.

Best regards.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
3,186
398
243
cPanel Access Level
Root Administrator
You may have to adjust the URLs in your application if they are not already using relative links, but you can just create the directory in your FTP client or in File Manager and then place the files there. For example, if you create "subfolder2" and put an index.html page there, I would expect domain.com/subfolder2/index.html to start working.