Witam,
Mam aplikację SPA (angular 5), mam do tego aplikację która wystawia restowe API w Javie.
Nie potrafię tego skomunikować na serwerze - posiadam Apache2(tutaj jest aplikacja w angularze ) + Tomcat8 (backend po localhost)
<VirtualHost *:80>
ServerAdmin root@localhost
ServerName app.servname.com
ServerAlias www.app.servname.com
DefaultType text/html
ServerAdmin webmaster@localhost
DocumentRoot /var/www/pb
<Directory /var/www/pb>
RewriteEngine on
# Don't rewrite files or directories
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# Rewrite everything else to index.html
# to allow html5 state links
RewriteRule ^ index.html [L]
</Directory>
</VirtualHost>
Próbowałem dodać
ProxyPass "/api" "localhost:8080/"
ProxyPassReverse "/api" "localhost:8080/"
ale wtedy nawet server nie chce wystartować wg