logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: apache 2.4.29 ubuntu 18.04 VirtualHost ssl redirects wrong.
Author
gene2



Joined: 08 Aug 2019
Posts: 2

PostPosted: Thu 08 Aug '19 18:30    Post subject: apache 2.4.29 ubuntu 18.04 VirtualHost ssl redirects wrong. Reply with quote

target url: "http://www.cart.example.com/" works fine.
SSL target url: "https://www.cart.example.com/" redirect to /var/www/html

However, "/var/www/html" is not a DocumentRoot for any virtual hosts.
Output of "apachectl -S":
VirtualHost configuration:
*:443 is a NameVirtualHost
default server example2.com (/etc/apache2/sites-enabled/000-default.conf:55)
port 443 namevhost example2.com (/etc/apache2/sites-enabled/000-default.conf:55)
alias www.example2.com
port 443 namevhost ycart.com (/etc/apache2/sites-enabled/ycart.conf:55) alias cart.example.com
alias www.cart.example.com
port 443 namevhost yh.com (/etc/apache2/sites-enabled/yh.conf:57)
alias hice.example.com
alias www.hice.example.com
wild alias *.yh.com
*:80 is a NameVirtualHost
...
Any idea what drives default SSL to /var/www/html?

I am not using any of the rewrite rules. I use
`<VirtualHost *:443>
ServerName cart.example.com
ServerAlias ycart.com
ServerAlias www.cart.example.com
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

SSLEngine on
SSLCertificateKeyFile /etc/letsencrypt/live/cart.example.com/privkey.pem
SSLCertificateFile /etc/letsencrypt/live/cart.example.com/fullchain.pem
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
</VirtualHost>`
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Wed 21 Aug '19 10:15    Post subject: Reply with quote

my guess is that document root is wrong set or the vhost name does not match.
Back to top


Reply to topic   Topic: apache 2.4.29 ubuntu 18.04 VirtualHost ssl redirects wrong. View previous topic :: View next topic
Post new topic   Forum Index -> Apache