Sample Header Ad - 728x90

How to setup virtual hosts to point to two diffrent directories

3 votes
1 answer
4019 views
I have one domain and a sub domain which are supposed to point to two different folder, i have tried this help but still i have issues. (https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04) www.wasamar.com.ng | wasamar.com.ng -> /var/www/html/wasamar/public this is the virtual host file (/etc/apache2/sites-available/wasamar.com.ng.conf) ServerName wasamar.com.ng ServerAlias www.wasamar.com.ng ServerAdmin info@wasamar.com.ng DocumentRoot /var/www/html/wasamar/public # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For example the # following line enables the CGI configuration for this host only # after it has been globally disabled with "a2disconf". #Include conf-available/serve-cgi-bin.conf www.ts.wasamar.com.ng | ts.wasamar.com.ng -> /var/www/html/wasamar_ts/public this is the virtual host file (/etc/apache2/sites-available/ts.wasamar.com.ng.conf) ServerName ts.wasamar.com.ng ServerAlias www.ts.wasamar.com.ng ServerAdmin info@wasamar.com.ng DocumentRoot /var/www/html/wasamar_ts/public/ # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For example the # following line enables the CGI configuration for this host only # after it has been globally disabled with "a2disconf". #Include conf-available/serve-cgi-bin.conf The pastebin of apache.conf file http://pastebin.com/dnDfB21y How do i achieve this?
Asked by udemethegrtman (33 rep)
Jan 21, 2017, 03:17 AM
Last activity: Jan 21, 2017, 07:23 AM