Giter VIP home page Giter VIP logo

vhost-manager's Introduction

vhost-manager

Modified version of the *nix version created by https://github.com/tobius

To use the (sort of) automated sites folder on windows with xampp

  • disable UAC (otherwise the script will alert you every time it runs)
    • go to control panel > system and security > Change User Account Control settings
    • move slider to the bottom (do not notify)
  • open cmd as admin (symlinks cannot be created unless in admin cmd)
    • hit the windows key or click the start bubble
    • type "cmd" and hit ctrl+shift+enter (at the same time)
  • set up environment
    • mkdir c:\bin
    • copy vhost and runvhost.bat to c:\bin
    • edit the vhost file where it says "[YOUR_WINDOWS_USER_NAME_HERE]" to ... your windows user name
    • mkdir c:\sites
    • cd c:\sites
    • mklink /D sitename c:\work\site\sitepublicfolder
    • repeat for all additional sites
  • if you have custom environment settings:
    • open a new notepad instance
    • in an empty text file, type or paste custom environment lines
    • save to c:\sites.sitename (no extension!)
    • repeat for all additional sites with custom environment settings Windows makes it absurdly complicated to get a scheduled task that runs without popping up a window in front of you every 5 minutes, so scheduled tasks are out.
      Your best bet is
  • create a shortcut on the desktop
    • Target: C:\bin\runvhost.bat
    • Run: Minimized
    • Advanced: Run as administrator

Now when you add a new symlink, click the shortcut AND PRESTO!

For updating everything even if nothing has "changed", such as config files getting corrupted, there is -force

php c:\bin\vhost -force

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.