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 [email protected] 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 [email protected] 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?
sudo a2ensite wasamar.com.ng.confandsudo a2ensite ts.wasamar.com.ng.conflet me add my main config (/etc/apache2/apache2.conf) please look up.