- Enable the following modules (Remove the # on beginning of the line) in
xampp/apache/conf/httpd.conf
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
- Copy and paste the bellow code, and edit the lines with "[EDIT]"
xampp/apache/conf/extra/httpd-vhosts.conf
<IfModule mod_proxy.c>
<VirtualHost *:80>
ServerName domain.localhost [EDIT]
ServerAlias WWW.domain.localhost [EDIT]
DocumentRoot "C:/Users/Ramon/xampp/htdocs/project/public" [EDIT]
<Directory "C:/Users/Ramon/xampp/htdocs/project/public"> [EDIT]
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
ProxyRequests On
<Proxy>
Order deny,allow
Allow from all
</Proxy>
ProxyVia On
ProxyPassMatch ^(?:(?!\/dev\/).)*\.(?:ico|gif|jpe?g|png|woff2?|eot|otf|ttf|svg|js|css)$ !
ProxyPass / http://127.0.0.1:3000/
ProxyPassReverse / http://127.0.0.1:3000/
ProxyPreserveHost On
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Methods "GET
</VirtualHost>
</IfModule>