Oz Web Services
  • Home
  • WP
  • PHP
  • JS
  • CSS
  • SCSS
  • HTML
  • XML
  • JSON
  • SQL
  • .htaccess
  • Apache
  • Nginx
  • INI
  • HTTP
  • Diff
Search shortcode

Virtual Host Bits

Updated April 24, 2015
# For localhost on XAMPP, and others
# file: httpd-vhosts.conf
# restart apache after making changes

#-------------------------------------------------------    DOMAIN
<VirtualHost *:80>
    ServerName DOMAIN.dev
    ServerAlias www.DOMAIN.dev
    DocumentRoot "/path/to/document/root/DOMAIN/"
    <Directory "/path/to/document/root/DOMAIN/">
        AllowOverride All
        Order Allow,Deny
        Allow from all
        Require all granted
    </Directory>
</VirtualHost>
<VirtualHost *:443>
    ServerName DOMAIN.dev
    ServerAlias www.DOMAIN.dev
    DocumentRoot "/path/to/document/root/DOMAIN/"
    <Directory "/path/to/document/root/DOMAIN/">
        AllowOverride All
        Order Allow,Deny
        Allow from all
        Require all granted
    </Directory>
    SSLEngine on
    SSLCertificateFile "/path/to/ssl/crt/DOMAIN.crt"
    SSLCertificateKeyFile "/path/to/ssl/key/DOMAIN.key"
</VirtualHost>
Oz Web Services
Copyright © 2015-2025 All Rights Reserved