GithubHelp home page GithubHelp logo

virtual-host's Introduction

Create virtual host in Mac OSx or Linux

Script para criação de virtual host.

Modo de usar

  1. Clone o repositório para sua máquina com o comando git clone [email protected]:ribeiroevandro/virtual-host.git .virtual-host;
  2. Acesse o diretório com cd .virtual-host abra a pasta do projeto com subl . O comando subl é um alias do Sublime Text, fique a vontade para usar o seu editor favorito.
  3. Altere o arquivo de acordo com o seu sistema operacional, para usuários de Mac OS, edite o arquivo mvhost.sh e usuários Linux, edite o arquivo lvhost.sh
  4. Informe seu usuário na variável USUARIO na linha 13;
  5. Torne o arquivo executável usando o comando chmod +x mvhost se estiver executando de um Mac OS ou chmod +x lvhost caso esteja usando Linux;
  6. Execute no terminal ln -s ~/.virtual-host/mvhost.sh /usr/local/bin/mvhost ou ln -s ~/.virtual-host/lvhost.sh /usr/local/bin/lvhost
  7. Reinicie o terminal e execute mvhost app-name ou lvhost app-name;

Resultado

Mac OS
<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /Users/user/Sites/app-name
    ServerName app-name.l
    <Directory /Users/user/Sites/app-name>
        Options Indexes FollowSymLinks
        AllowOverride All
        Allow from all
    </Directory>
    ErrorLog /var/log/app-name-error.log
    CustomLog /var/log/app-name-access.log combined
</VirtualHost>
Linux
<VirtualHost *:80>
	ServerAdmin webmaster@localhost
	DocumentRoot /var/www/app-name
	ServerName app-name.l
	<Directory "/var/www/app-name">
		Options Indexes FollowSymLinks
		AllowOverride All
		Allow from all
	</Directory>
	ErrorLog /var/log/app-name-error.log
	CustomLog /var/log/app-name-access.log combined
</VirtualHost>

virtual-host's People

Contributors

ribeiroevandro avatar nicholasess avatar

Stargazers

Nícolas Rossett avatar Gabriel Masson avatar Nícolas Rossett avatar

Watchers

 avatar

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.