0
Hello, my friends!
Context: I have a dedicated server to host web applications.
- The root directory of it is default/var/www/html of any server.
- I want to host, first, a website.
- In the root folder (/var/www/html) is the phpmyadmin and the website (that is, two folders)
- I’m updating the site files via GIT, IE, it has to stay in a separate folder, in case the "site" folder. And also to use GIT pull and not trouble with the folder phpmyadmin
Problem: The problem is that ALL the files I call externally are coming from root, for example
<link href="/css/style.css">
That is, it is calling the following path:
/var/www/html/css/style.css
You have solutions to add the folder website, as follows:
<link href="/site/css/style.css">
But that is not the proposal. If you did so, you would have to change everything in an entire application and it would be harder to work locally and collaborate with other people.
Question: I would like to know what is the right way to do this and to work, in the future, also with more sites and folders within /var/www/html, without changing the path of the entire application and hindering the functioning of git?
Considerations: If it’s not clear enough, please let me know that I’ll try to go into more detail!
I’ll read the article and I’ll come back and tell you if it worked. Thanks, buddy!
– Artur
Consider installing a Control Panel to assist management. There is a free solution called Vestacp
– lazyFox
@Caiqueromero thanks for the guidelines, he was absolutely right. I edited the answer adding essential parts that will help solve the problem
– Samuel Fontebasso
Solved. I read the article, and the articles inside the article. I just need to download the domains and configure DNS and stuff.
– Artur