0

I have just moved my apache2/Tomcat9 server from windows to ubuntu. ProxyPass and ProxyPassReverse are working fine. Known tomcat webapp urls are all passing through.

However, when I just enter the www.myservername.com it goes to the default var/www directory.

I tried redirecting using 000-default.conf. The following works for http://www.myservername.com but does not work for https://www.myservername.com

ServerName www.myservername.com

ServerName www.myservername.com
<VirtualHost *:*>

    ServerName www.myservername.com
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
    Redirect permanent / https://www.myservername.com/ddd-college-website/entry
</VirtualHost>

So, in short, typing https://www.myservername.com/ into the browser, should take users to https://www.myservername.com/ddd-college-website/entry. But it's not happening

Any advice would be appreciated

0

For ServerName set just the Servername, not the portnumber. And for the Redirect it is Redirect permanent / https://whatever/

  • actually, the problem was only with https....not surprising since port is set to 80.....my mistake – Jake Feb 20 '18 at 22:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.