wamp https vhost domain redirects to localhost https - apache

I have setup WAMP on C:\wamp, I followed a tutorial guide to setup HTTPS on my wamp. made ssl with openssl.. I was able to browse https://localhost as well as http://localhost, the problem is, I have set a couple of virtual host domains in httpd-vhost.conf I can browse them normally as in without https BUT when I enter **https**://domain.local it redirects to WAMP **https**://localhost
I simply can't seem to fix it or get a solution online.. what settings could be causing to redirect to https://localhost instead of https://domain.local

I think the problem is in var/wamp/www/yourproject/shared/config/config.php.
Find ('K_REDIRECT_LOGIN_MODE', 4) and change 4 to 3 (html redirect).

Related

Cannot disable apache http->https redirection

I'm managing a Centos 7.7 server with apache 2.4 working fine so far. I hace SSL configured and running, and all my pages are served without problem (all of them through https).
Now I have to run a site which is badly coded and doesn't show correctly through https, because mixed content errors block css. The problem is that http is not working, there is a 301 Redirect to https that I'm unable to find in the configuration files. There are no Rewrites, Redirects or ProxyPass in the configuration files (grep -r Rewrite or Redirect in apache directory couldn't find anything), except this ones:
ProxyPassMatch ^/foo/(.*.php)$ fcgi://127.0.0.1:9000/mnt/data/foo/$1
ProxyPassMatch ^/foo2/(.*.php)$ fcgi://127.0.0.1:9000/mnt/data/foo2/
for using php7 only for this sites.
I have a default:443 and a default:80 VirtualHost and I cannot see anything strange.
Also I checked firewalld in case there is a Port redirection, whith no luck.
Any idea? Thanks in advance.
I solved it by myself. It turns out that firefox was doing nasty things, and clearing site preferences as pointed in
Firefox redirects to https
solved the issue.

MAMP Pro, 403 forbidden unless typing https://

I have recently started switching all my sites to SSL, locally using Mamp Pro virtual hosts and self-sign certificates.
All works fine with one exception:
if I type local.domainname.co.uk in a browser I get a 403 error, unless I type the full https:// first, then it works fine. On the live site it all works as expected; type domainname.co.uk and the browser fills in the https:// for me.
These are drupal sites using htaccess module to force the ssl - but since it works live but not local I'm assuming its a mamp issue?
Solved this - I needed to set up a non-SSL host in MAMP with the same name and settings as the SSL host (with SSL unchecked obviously) - although I want the site all https, there still needs to be an http host so it can re-direct to ssl (until browsers default to https at some point in the future?). MAMP instructions.
Or don't bother if you can live with typing https:// every time!

Clean install of Apache redirects domain to https

I've just done a clean install of my server, and installed apache and PHP. I've adapted the default apache virtual hosts file to target the necessary folder and enabled the site, but for some reason when I attempt to access the page in a browser it attempts to reach https://example.com/ instead of http://example.com/
This is newly installed apache server so I have no clue why it would try and use SSL, and as far as I can tell my DNS settings for the domain are correct and I can't see any redirects to https

apache redirect to SSL configured site

I am trying to setup a gitlab repository and I am quite new to the web server side of things. My setup is the following:
I have an apache server which is running my main website on port 8080.
I have the gitlab configured with SSL and Nginx and running on port 2443.
At the moment, the gitlab site can be accessed through https://www.example.com:2443.
What I would like to do is setup a redirect through my apache server where if someone comes to http://www.example.com/gitlab or https://www.example.com/gitlab, they get redirected to ``https://www.example.com:2443` (preferably without the web browser text field changing).
Could this be done easily with Apache? Also, since the redirect is to an SSL site, any special things we need to consider?
You can try adding the redirect directive to your Apache VirtualHosts (8080 and 443).
Redirect permanent /gitlab https://www.example.com:2443

one server many http domains and one https domain

I haven't been able to solve an issue with my server:
I use a linux server, Debian 7.0 distro.
I am hosting many different domains, all except one, are plain http domains which I can easily redirect using virtual hosts on httpd.conf or apache2.conf. The problem I can't solve is with one domain, which requires SSL, so I need to force redirect http to https. I worked on virtual host of that specific domain, and managed to get http to https redirect, but now, all remaining domains are forced also to the https domain. How can achieve each http domain redirects to it's own, but also the requires SSL domain redirects to https?
Thanks
If you are using some versions of Apache, I know as late as version 2.2, you will need to include the line:
NameVirtualHost *:80
before your virtual host lines. I can't be sure that this is your problem, but I just had the exact same thing happening to me on Arch, which apparently doesn't have the latest Apache.