Currently I have a project where I separate the part of the backend and frontend, for the backend I use laravel and for the front I use AngularJS, this separated into two folders api (laravel) api_front (angularjs), both inside the folder project .
When I log into the browser: link I automatically upload the part made with angularjs
since the configuration in the server I have it in this way
/etc/apache2/sites-available/000-default.conf
Virtual Host 1:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/proyecto/api_front/
<Directory /var/www/html>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<IfModule mod_dir.c>
DirectoryIndex index.php index.pl index.cgi index.html index.xhtml index.htm
</IfModule>
</VirtualHost>
The problem I have is that in the angularJS project I use WebServices from the part made with laravel.
Example of webService: http://ip_servidor/proyecto/api/public/ws/colaboradores
but when I consult that Web Service in the browser I get Not Found
The requested URL / project / api / public was not found on this server
Then I have created a second Virtual Host:
<VirtualHost *:88>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/proyecto/api/
<Directory />
Options FollowSymLinks
AllowOverride none
</Directory>
<Directory /var/www/html/proyecto/api/>
Options Indexes FollowSymLinks MultiViews
AllowOverride none
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<IfModule mod_dir.c>
DirectoryIndex index.php index.pl index.cgi index.html index.xhtml index.htm
</IfModule>
</VirtualHost>
But this new route is still not working. Please can you help me, thank you in advance.