Last active
February 23, 2016 12:22
-
-
Save mariohmol/6e7c5ca40a82f624a55f to your computer and use it in GitHub Desktop.
Configure Apache 2.4 + AngularJS + API (Stronloop LoopBack)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
CustomLog /home/myapp/logs/wsgi.log common | |
ErrorLog /home/myapp/logs/error.log | |
LogLevel info | |
DocumentRoot /home/myapp/myclone/client | |
ServerName myapp.com | |
RewriteEngine On | |
# If an existing asset or directory is requested go to it as it is | |
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f | |
RewriteCond %{REQUEST_URI} !^/api$ | |
RewriteRule ^ - [L] | |
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d | |
RewriteCond %{REQUEST_URI} !^/api$ | |
RewriteRule ^ - [L] | |
RewriteCond %{REQUEST_URI} !^/api | |
# If the requested resource doesn't exist, use index.html | |
RewriteRule ^ /index.html | |
ProxyRequests Off | |
ProxyPreserveHost On | |
<Proxy *> | |
Order deny,allow | |
Allow from all | |
</Proxy> | |
ProxyPass / http://localhost:3502/ | |
ProxyPassReverse / http://localhost:3502/ | |
<Location /> | |
Require all granted | |
</Location> | |
</VirtualHost> | |
<Directory "/home/myapp/myclone/client"> | |
Options +Indexes +MultiViews +FollowSymLinks +SymLinksIfOwnerMatch +ExecCGI | |
AllowOverride All | |
Require local | |
Order allow,deny | |
Allow from all | |
</Directory> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment