Skip to content

Instantly share code, notes, and snippets.

@hemc4
Created April 22, 2016 10:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hemc4/a92db888262303b973deaae9d8510f98 to your computer and use it in GitHub Desktop.
Save hemc4/a92db888262303b973deaae9d8510f98 to your computer and use it in GitHub Desktop.
files:
"/etc/httpd/conf.d/vhost.conf":
mode: "000644"
owner: root
group: root
encoding: plain
content: |
NameVirtualHost *:80
#
<VirtualHost *:80>
ServerName testapp.example.com
DocumentRoot "/var/www/html/frontend/web/"
#
<Directory "/var/www/html/frontend/web/">
# use mod_rewrite for pretty URL support
RewriteEngine on
# If a directory or a file exists, use the request directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Otherwise forward the request to index.php
RewriteRule . index.php
#
# use index.php as index file
DirectoryIndex index.php
#
# ...other settings...
</Directory>
</VirtualHost>
#
<VirtualHost *:80>
ServerName testappadmin.examplec.com
DocumentRoot "/var/www/html/backend/web/"
#
<Directory "/var/www/html/backend/web/">
# use mod_rewrite for pretty URL support
RewriteEngine on
# If a directory or a file exists, use the request directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Otherwise forward the request to index.php
RewriteRule . index.php
#
# use index.php as index file
DirectoryIndex index.php
#
# ...other settings...
</Directory>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment