Here is some sample code to use to setup a virtual host. I got it from ruby web developers who run multiple ruby apps on the same apache server (as with ruby you can't just upload multiple scripts to different folders with FTP or WebDAV and have it work like you can with php). The values are supposed to be modified somehow. You might want to change http://
to https://
Remember that WebDAV does not show files that begin with a full stop, so you'll have to use FTP or your online control panel like cpanel, directadmin or plesk and use the file manager from that.
You can find out your home directory path by logging into your control panel. If you're using localhost on windows, you can replace /home/desbest
with something like c:\users\desbest\UniServerZ\www\dokuwiki2018
if you're working on localhost. Also example2.com
can be changed to localhost
if you're working from localhost on your computer.
The mod_rewrite
and other 3 rules that you see in the tutorial you provided, are not shown below. Once you get your virtual host setup using the code I've provided below, you can then add the rewrite rules that dokuwiki provides.
httpd-vhosts.conf
# Virtual Hosts
#
<VirtualHost *:80>
ServerName example2.com
DocumentRoot /home/desbest #server path to home directory
<Directory "/home/desbest/"> #server path to home directory #the trailing slash here is VERY important
Options +Indexes +Includes +FollowSymLinks +MultiViews
# AllowOverride All
AllowOverride None
Require local
</Directory>
ProxyPass "/subfolder/" "http://example.com/" #the trailing slash here is VERY important
ProxyPassReverse "/subfolder/" "http://example.com/" #the trailing slash here is VERY important
</VirtualHost>
.htaccess
<VirtualHost *:80>
ServerName example2.com
DocumentRoot /subfolder
# PassengerEnabled off
ProxyPass /compesh http://example.com
ProxyPassReverse /subfolder http://example.com/ #the trailing slash here is VERY important
</VirtualHost>