Skip to content

Instantly share code, notes, and snippets.

@sherakama
Last active May 3, 2016 17:11
Show Gist options
  • Save sherakama/7d39a92162052882bd46 to your computer and use it in GitHub Desktop.
Save sherakama/7d39a92162052882bd46 to your computer and use it in GitHub Desktop.
vhosts for *.dev domain
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<Directory /httpdocs>
Options FollowSymLinks Multiviews
MultiviewsMatch Any
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /opt/simplesamlphp/www>
Options FollowSymLinks Multiviews
MultiviewsMatch Any
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<VirtualHost *:80>
DocumentRoot "/httpdocs"
ServerName sheamck-macbook-pro.local
ServerAlias smbp.local
SetEnv SIMPLESAMLPHP_CONFIG_DIR /opt/simplesamlphp/config
Alias /simplesaml /opt/simplesamlphp/www
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/httpdocs"
ServerName localhost
ServerAlias local.dev
SetEnv SIMPLESAMLPHP_CONFIG_DIR /opt/simplesamlphp/config
Alias /simplesaml /opt/simplesamlphp/www
</VirtualHost>
<VirtualHost *:80>
VirtualDocumentRoot "/httpdocs/%0"
ServerName dev
ServerAlias *
SetEnv SIMPLESAMLPHP_CONFIG_DIR /opt/simplesamlphp/config
Alias /simplesaml /opt/simplesamlphp/www
</VirtualHost>
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
## SSL HTTPS ##
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
<VirtualHost *:443>
DocumentRoot "/httpdocs"
ServerName sheamck-macbook-pro.local
ServerAlias smbp.local
SetEnv SIMPLESAMLPHP_CONFIG_DIR /opt/simplesamlphp/config
Alias /simplesaml /opt/simplesamlphp/www
SSLEngine On
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /etc/apache2/ssl/localhost.crt
SSLCertificateKeyFile /etc/apache2/ssl/localhost.key
</VirtualHost>
<VirtualHost *:443>
DocumentRoot "/httpdocs"
ServerName localhost
ServerAlias local.dev
SetEnv SIMPLESAMLPHP_CONFIG_DIR /opt/simplesamlphp/config
Alias /simplesaml /opt/simplesamlphp/www
SSLEngine On
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /etc/apache2/ssl/dev.crt
SSLCertificateKeyFile /etc/apache2/ssl/dev.key
</VirtualHost>
<VirtualHost *:443>
VirtualDocumentRoot "/httpdocs/%0"
ServerName dev
ServerAlias *
SetEnv SIMPLESAMLPHP_CONFIG_DIR /opt/simplesamlphp/config
Alias /simplesaml /opt/simplesamlphp/www
SSLEngine On
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /etc/apache2/ssl/dev.crt
SSLCertificateKeyFile /etc/apache2/ssl/dev.key
</VirtualHost>
@sherakama
Copy link
Author

Now with HTTPS and simplesaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment