Skip to content

Instantly share code, notes, and snippets.

@lnoering
Last active January 12, 2016 17:55
Show Gist options
  • Select an option

  • Save lnoering/1ca65c7351f014a34d9e to your computer and use it in GitHub Desktop.

Select an option

Save lnoering/1ca65c7351f014a34d9e to your computer and use it in GitHub Desktop.
[vhosts] Configurações de vhost.

<VirtualHost *:80> ServerAdmin suporte@empresa.com.br ServerName loja.com.br ServerAlias www.loja.com.br DirectoryIndex index.php index.html DocumentRoot (CAMINHO DA LOJA/) #Alias /blog (CAMINHO DA LOJA/)blog/

    <Directory (CAMINHO DA LOJA/)>
        Order allow,deny
        Allow from all
    </Directory>

    <Directory (CAMINHO DA LOJA/)>
        Options -Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>
    
    LogLevel warn
    ErrorLog  /var/log/apache2/loja_error.log
    CustomLog /var/log/apache2/loja_access.log combined

<VirtualHost *:443> ServerAdmin suporte@empresa.com.br ServerName loja.com.br ServerAlias www.loja.com.br #Redirect "/blog" "http://loja.com.br/blog" DirectoryIndex index.php index.html DocumentRoot (CAMINHO DA LOJA/)

<Directory (CAMINHO DA LOJA/)>
	Options -Indexes FollowSymLinks MultiViews
	AllowOverride All
	Order allow,deny
	allow from all
</Directory>

<DirectoryMatch .hg>
	Order allow,deny
	Deny from all
</DirectoryMatch>

LogLevel warn
ErrorLog  /var/log/apache2/loja_error.log
CustomLog /var/log/apache2/loja_access.log combined
SSLEngine on
SSLCertificateKeyFile /etc/ssl/loja.com.br/2014/loja.com.br.key
SSLCertificateFile /etc/ssl/loja.com.br/2014/loja_com_br.crt
SSLCertificateChainFile /etc/ssl/loja.com.br/2014/loja_com_br.ca-bundle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment