Last active
January 1, 2016 19:39
-
-
Save ricardoriogo/8191541 to your computer and use it in GitHub Desktop.
Cria um novo arquivo de configuração VHOST do Apache.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
SET appath=D:\xampp\apache\conf\sites\ | |
SET /p dominio=Indique o dom¡nio ^*.dev a ser usado: | |
SET /p folder=Digite o caminho ROOT ou tecle ENTER para usar a pasta atual: | |
SET /p group=Digite o nome do grupo ao qual este dominio pertence: | |
IF "%folder%" == "" SET folder=%~dp0 | |
IF NOT "%group%" == "" SET group=%group%\ | |
MD %appath%%group% 2>nul | |
ECHO ^<VirtualHost *:80^> > %appath%%group%%dominio%.conf | |
ECHO ServerName %dominio%.dev >> %appath%%group%%dominio%.conf | |
ECHO ServerAlias %dominio% *.%dominio% %dominio%.local >> %appath%%group%%dominio%.conf | |
ECHO DocumentRoot "%folder%" >> %appath%%group%%dominio%.conf | |
ECHO ^</VirtualHost^> >> %appath%%group%%dominio%.conf | |
ECHO ^<Directory "%folder%"^> >> %appath%%group%%dominio%.conf | |
ECHO Options Indexes FollowSymLinks Includes ExecCGI >> %appath%%group%%dominio%.conf | |
ECHO AllowOverride All >> %appath%%group%%dominio%.conf | |
ECHO Order allow,deny >> %appath%%group%%dominio%.conf | |
ECHO Allow from all >> %appath%%group%%dominio%.conf | |
ECHO Require all granted >> %appath%%group%%dominio%.conf | |
ECHO ^</Directory^> >> %appath%%group%%dominio%.conf | |
PAUSE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment