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.
Related
I have set up a server with a wiki and Wordpress and Nextcloud on a new Domain, let's say it's testing.com. When I was finished, I wanted to change the Domain from testing.com to realdomain.com.
The server is running CentOS 7 with httpd (apache), so I changed the ServerName in /etc/httpd/conf/ to "realdomain.com". Then I changed the VirtualHosts in all the files in /etc/httpd/conf.d.
I added the new Domain to the trusted Domains of the Wordpress, Nextcloud and wiki. I restarted the httpd service and the server itself.
Yet, when I open realdomain.com in browser, it shows me my websites, but it puts testing.com in the address field.
I tried using mod_rewrite to change the URL, but then my webbrowser tells me that the site doesnt redirect correctly and that the redirects never stop.
I tried those rewrite rules in the .conf files and in the .htaccess (not simultaneously)- no success.
I removed all my files in conf.d and created a new DocumentRoot with a simple helloWorld.html - The Url still gets rewritten to testing.com.
Are there any other locations that could have rewrite rules? Did I miss anything?
Thank you so much in advance, this is killing me!
Trying to reverse proxy with https only. All though the ssl & https works with the chosen domain, it is directing to the apache root not the desired reverse proxy server.
So far Ive got the server to force https when http is used. I rewrite www to non www. Ive had reverse proxy work fine when its just http but https goes to the "it works" root file with a green lock.
Any ideas?
So i solved this issue at the last hour. But where i am confused is i solved this by manipulating the config files and using the defualt text. Not by adding my own virtual hosts and injecting code at the bottom like the old days or blogs would suggest. I added proxy rules into the proxy config file. Added cert paths into the ssl config file and that seemed to take over randomly pasting code into http config as it might be sugested elsewhere on the net.
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).
My problem is, that I recently set up a Tomcat7 application container with Apache2.2 Frontend. As the project is still under development I am controlling access by an IP whitelist set up in .htaccess for the domain.
I set up mod_jk via AJP13 to Tomcat, it works absolutely fine, except the fact that .htaccess doesn't block the forward for Tomcat. In other words if you enter www.mydomain.com from a "black" IP, you get forwarded to the error page but if you enter www.mydomain.com/AppContext you slip through Apache into Tomcat
I started messing with urlrewritefilter with Tomcat, but for some reason it didn't work.
I am wondering if there is any way to set up .htaccess or apache instead to block requests forwarded to Tomcat similarly to request for Apache?
Also noticed a dramatic speed decrease when using it like that, us that common when using Apache as a frontend?
.htaccess files will work only when Apache is using a <Directory> based configuration (in httpd.conf). In case of mod_jk, matching requests (as specified by JkMount directive) will simply be forwarded to the AJP connector.
Use <Location> to control access instead:
<Location "/AppContext">
Order Deny,Allow
Deny from all
Allow from .myCompany.local
</Location>
See <Location> Directive> for details.
I faced the same problem and found a solution which may solve your case too.
Use a reverse proxy server like Nginx or Squid to redirect the traffic Apache Tomcat. Both of them can use htpassword for authentication and hence, will serve your need. If you want to use Apache as frontend then backend can be nginx which in turn will redirect to Tomcat after proper authentication. It may have a performance hit, though.
https://www.digitalocean.com/community/tutorials/how-to-set-up-http-authentication-with-nginx-on-ubuntu-12-10
I'm having an issue with Railo 3.1.0 running under Apache on Windows Server 2003.
When going to http://www.domain.com it defaults to index.cfm.
When going to http://domain.com it doesn't find index.cfm. http://domain.com/index.cfm works fine.
Anyone know where I can configure this?
Looks like Apache virtual host misconfiguration, not Railo. Re-check DirectoryIndex setting for domain.com site config (in sites-available), it should contain index.cfm on first place.