Skip to content
A simple bash script that creates a virtual host in Apache on Windows with WAMP using WSL
Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
vhost.sh

README.md

WAMP - Apache VirtualHost Script (WSL)

A simple bash script that creates a virtual host in Apache on Windows with WAMP using Windows Subsystem for Linux.

How to use

./vhost.sh <domain> <path>

(e.g. ./vhost.sh project.local 'c:\project\directory')

What it does

  • Adds a domain mapping to C:\windows\drives\etc\hosts
  • Adds VirtualHost to C:\wamp_directory\bin\apache\apache2.2.22\conf\extra\httpd-vhosts.conf
  • Restarts WampApache service

What can be done later

  • Add the script to PATH via ~/bin
  • Create an alias for the command ./vhost.sh to easily use the command

Thanks

This script is based on https://github.com/renekopcem/wamp-vhost script.

You can’t perform that action at this time.