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:
- no redirect https happens
- 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
Post a Comment