1๐
โ
- Open
/Applications/XAMPP/xamppfiles/etc/httpd.conf
file in any editor and look for the following lines.
# Virtual hosts
# Include /Applications/XAMPP/etc/extra/httpd-vhosts.conf
-
Remove
#
from second line to enable virtual host -
Open
/Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf
file, remove everything and write below code.
<VirtualHost *:8080>
ServerName myweb.site
ServerAlias myweb.site
<Location />
ProxyPass "/" "http://localhost:3000/"
ProxyPassReverse "/" "http://localhost:3000/"
</Location>
</VirtualHost>
- Open
/etc/hosts
and add127.0.0.1 myweb.site
to bottom - Restart Apache Server from XAMPP Control Panel
myweb.site
should be same in both file, this will be your URL for your Vue app andhttp://localhost:3000
is your app url, port should be same with port of your development server
- Open any browser and enter
http://localhost:8080
orhttp://myweb.site
๐คAhmet Zeybek
Source:stackexchange.com