Hello, friends!
Context: I have a dedicated server to host web applications.
- The root directory is the default / var / www / html of any server.
- I want to host a website first.
- In the root directory (/ var / www / html) is phpmyadmin and the site
- I'm updating the site files via GIT, ie it has to stay in a separate folder, in this case the "site" folder. And also to use the GIT pull and do not give problem with the folder phpmyadmin
Problem: The problem is that ALL files that I call externally are coming from root,
<link href="/css/style.css">
That is, it is calling the following path:
/var/www/html/css/style.css
You have the solutions to add the site folder, as follows:
<link href="/site/css/style.css">
But that's not the proposal. If you did, you would have to change everything in one whole application and it would be harder to work locally and collaborate with other people.
Question: I would like to know the right way to do this and to work in the future with more sites and folders within / var / www / html, without changing the path all the application and damaging the operation of git ?
Considerations: If it was not clear enough, please let me know that I'll try to get more detailed!