Skip to content

Instantly share code, notes, and snippets.

@avdata99
Last active December 16, 2015 09:49
Show Gist options
  • Save avdata99/5415857 to your computer and use it in GitHub Desktop.
Save avdata99/5415857 to your computer and use it in GitHub Desktop.
VirtualHosts+VirtualDocumentRoot on cpanel (/var/cpanel/userdata/myuser/mydomain.com)
I wrote this:
---
customlog:
-
format: combined
target: /usr/local/apache/domlogs/mydomain.com
-
format: "\"%{%s}t %I .\\n%{%s}t %O .\""
target: /usr/local/apache/domlogs/mydomain.com-bytes_log
group: myuser
hascgi: 1
homedir: /home/myuser
ifmodulemodsuphpc:
group: myuser
ip: 66.66.66.66
owner: root
phpopenbasedirprotect: 1
port: 80
scriptalias:
-
path: /home/myuser/public_html/cgi-bin
url: /cgi-bin/
-
path: /home/myuser/public_html/cgi-bin/
url: /cgi-bin/
serveradmin: you@mydomain.com
serveralias: "*.mydomain.com"
servername: mydomain.com
usecanonicalname: 'Off'
user: myuser
userdirprotect: ''
virtualdocumentroot: /home/myuser/public_html/$1
--------------------------------------------------------
AND THE ADD THE FILE
/usr/local/apache/conf/userdata/std/2/myuser/mydomain.com/virt.conf
(the folders doesn't exists)
WITH THIS CONTENT
VirtualDocumentRoot /home/myuser/public_html/%1/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment