Skip to content

Instantly share code, notes, and snippets.

@hugoleodev
Created January 10, 2013 01:13
Show Gist options
  • Save hugoleodev/4498556 to your computer and use it in GitHub Desktop.
Save hugoleodev/4498556 to your computer and use it in GitHub Desktop.
Configuração do apache para desenvolvimento customizado
# Ativar o modulo "mod_vhost_alias" do apache: sudo a2enmod vhost_alias
# Instalar o dnsmask: sudo apt-get install dnsmasq
# Adicionando ao final do arquivo "/etc/dnsmasq.conf" as seguintes linhas:
# listen-address=127.0.0.1
# address=/.dev/127.0.0.1
#
# Crie o arquivo de configuração do apache adcionandoas linhas a baixo
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerAlias *.dev
UseCanonicalName Off
VirtualDocumentRoot /home/hugo/web/%1
<Directory "~/web*">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
# Reinicie os serviços
# sudo service dnsmasq restart
# sudo service apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment