Skip to content

Instantly share code, notes, and snippets.

@manishprajapatidev
Created January 19, 2020 17:42
Show Gist options
  • Save manishprajapatidev/944e9facb07bb762b9cc43424f4c7b07 to your computer and use it in GitHub Desktop.
Save manishprajapatidev/944e9facb07bb762b9cc43424f4c7b07 to your computer and use it in GitHub Desktop.
React JS and Node JS API ProxyPass Configuration
<VirtualHost *:80>
ServerName marutiincjaipur.com
DocumentRoot /var/www/html
<Directory "/var/www/html/console">
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>
#ProxyPass /console http://127.0.0.1:3000/
#ProxyPassReverse /console http://127.0.0.1:3000/
ProxyPass /web-api/ http://127.0.0.1:3001/
ProxyPassReverse /web-api/ http://127.0.0.1:3001/
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment