I am some strange behaviour in MAMP stack 64-bit on OS X.
Below is my configuration for apache :
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "/Applications/mampstack-5.3.21-0/apache2/htdocs/tdf"
ServerName www.tdf.com
ErrorLog '|/Applications/mampstack-5.3.21-0/apache2/bin/rotatelogs "logs/tdf-80-error_log" 2592000'
CustomLog '|/Applications/mampstack-5.3.21-0/apache2/bin/rotatelogs "logs/tdf-80-access_log" 2592000' "%h %l %u %t \\"%r\\" %>s %b"
Include "conf/extra/httpd-dontlog.conf"
ProxyPassReverse /jira http://192.168.1.5:9090/jira
ProxyPass /jira http://192.168.1.5:9090/jira retry=5
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/Applications/mampstack-5.3.21-0/apache2/htdocs/tbhk"
ServerName www.tbhk.com
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.tbhk.com
RewriteRule ^/(.*)$ https://www.tbhk.com/$1 [L,R=301]
ErrorLog '|/Applications/mampstack-5.3.21-0/apache2/bin/rotatelogs "logs/tbhk-80-error_log" 2592000'
CustomLog '|/Applications/mampstack-5.3.21-0/apache2/bin/rotatelogs "logs/tbhk-80-access_log" 2592000' "%h %l %u %t \\"%r\\" %>s %b"
</VirtualHost>
Here is the output from bin/apachectl -S :
VirtualHost configuration: 192.168.1.3:443 www.tbhk.com (/Applications/mampstack-5.3.21-0/apache2/conf/extra/httpd-ssl.conf:250) wildcard NameVirtualHosts and default servers: *:80 is a NameVirtualHost default server www.tdf.com (/Applications/mampstack-5.3.21-0/apache2/conf/extra/httpd-vhosts.conf:27) port 80 namevhost www.tdf.com (/Applications/mampstack-5.3.21-0/apache2/conf/extra/httpd-vhosts.conf:27) port 80 namevhost www.tbhk.com (/Applications/mampstack-5.3.21-0/apache2/conf/extra/httpd-vhosts.conf:44)
OK, here is what is normal :
http://www.tdf.com (works)
http://www.tbhk.com -> it redirects to https://www.tbhk.com (works)
Here is what is not working :
http://www.tdf.com/jira -> redirected to https://www.tbhk.com/jira/
http://www.tdf.com/jira/ -> redirected to https://www.tbhk.com/jira/
I cannot figure out why the configuration in 1 vhost would be passed to the other vhost.
I need to configure lots of Proxy URI to servers behind the MAMP stack, and now no applications can be used, yet.
Please help.