document root - apache conf Redirect not working -


so have apache .conf file working expected except 1 specific issue. if type in https://oaks.statehr.com shows in true documentroot of /var/www/statehr (see below) , works fine.

but if enter http://oaks.statehr.com (no https), have 2 problems:

  1. no redirect https happens
  2. the document root /var/www vs. /var/www/statehr

any idea why? here actual conf file

<virtualhost *:80> servername oaks.statehr.com redirect / https://oaks.statehr.com/ documentroot /var/www/statehr </virtualhost>  <virtualhost *:443> documentroot /var/www/statehr servername oaks.statehr.com <directory "/var/www/statehr"> allow options -indexes </directory> errorlog /var/www/statehr/sites/oaks/error/apache.error.log customlog /var/www/statehr/sites/oaks/error/apache.access.log common php_flag log_errors on php_value error_log /var/www/statehr/sites/oaks/error/php.error.log logformat "%h %l %u %t \"%r\" %>s %b \"%{referer}i\" \"%{user-agent}i\" %p" wpid  sslengine on sslcertificatefile /etc/apache2/ssl/*.statehr.com.crt sslcertificatekeyfile /etc/apache2/ssl/*.statehr.com.key </virtualhost> 

not sure if resolved or not, 1 thing may consider trying removing double-quotes around <directory "/var/www/statehr">, have not seen done in past.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -