Hi, i’m new to the development world. I just migrated a project from my computer(Windows local) to the server on cloud (VM Línux). I’m using a simple MVC based architecture. The question is:
1 - I did all necessery configiratios on httpd.conf file as:
DocumentRoot "/MyProject/public" <Directory "/MyProject/public"> AllowOverride all Require all granted </Directory>
-#I uncommented the lines belowon.
Include etc/extra/httpd-vhosts.conf Include etc/extra/httpd-xampp.conf
2- In the httpd-vhosts.conf file i have:
<VirtualHost *:80> ServerAdmin email@example.com DocumentRoot "/MyProject/public" ServerName "MyServerName.com" ErrorLog "logs/MyServerName.com-error_log" CustomLog "logs/MyServerName.com-access_log" common </VirtualHost>
3- In my hosts file i added:
I’m not using any .htaccess file for application and if I should use it, I have no idea how to configure it. The project works fine on my local server (my computer), I’m using Xampp in both scenarios(Local and VM).
I just have an index.php file in the public directory with the following code:
require_once("../vendor/autoload.php"); $route = new \App\Route;
Any ideas on how to resolve this? Please! Thanks!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.