I have a weird problem. I can't preview one of my websites locally because the URL defaults to https - in all of my browsers.
I'm using MAMP PRO on a Mac. I created an alias of the problem site, but I have the same problem when I try the new URL - it defaults to https and doesn't display anything. All my other local sites display normally at http:.
Does anyone have any idea what would cause this and how I can fix it?
Edit: I should add that if I manually change the URL from https to http, it just defaults back to https.
Find where mamp pro installed, and find where is has stored apache.
Go here and read this guide: https://www.digicert.com/ssl-support/apache-disabling-ssl-v3.htm
In summary, find apache config. Most times apache.conf of apache2.conf and append SSLProtocol all -SSLv2 -SSLv3 to in. Then restart apache :)
Related
Im running xampp-vm on macOS Catalina. Site loads fine on the provided ip by xampp (192.168.X.X/project_name) but it does not work on localhost (localhost/project_name). Is this normal or is there a way to fix this?
Please go to check 'Network' tab to edit the mapping like:
localhost:8080 -> 80
to
localhost:80 -> 80
Image from the FAQ of Xampp:
https://www.apachefriends.org/faq_stackman.html
Put your projects in different folder. Assign for each project a different domain.
Configure Apache with different hosts.
You can follow the following video about how to setup PHP environment using XAMPP. The last part contains vhosts configuration
I've got a local Apache server running for web development on my Mac running 10.14 Mojave. I've followed this rather excellent guide to set up a local vhost setup aliasing all .dev sites to my local server so I can access my example site at example.dev.
This used to work just fine. Since I've upgraded OSX to Mojave, I can no longer access these sites via Chrome or Firefox. I try to access http://example.dev and instead loading the site, the browser instantly redirects to https://example.dev (note the s!) and it tells me the server refused to connect.
For fun, I tried using curl to see if the sites would load there- (they do!). I've also tried loading the sites in Safari (they do!).
So what seems to be going on is that Chrome and Firefox are getting a 307 redirect from http to https, but Safari is not.
I've checked my Apache httpd.conf (and the files it imports) and I can't find anything about redirecting.
Clearing the cache or using an incognito window does not change anything.
Does anyone have any insight into what could be going on here? I've checked my httpd.conf files and I'm not seeing anything that would be causing this- and the fact that it's affecting certain browsers but not others is really strange.
I found the solution: The .dev TLD was recently defined, and Chrome and Firefox now require it to use HTTPS. Turns out the guide I was working off of was even updated to reference this:
Previous versions of this tutorial used .dev as a local TLD but .dev
has been registered for use by Google and forced by Chrome to use SSL,
so it is no longer an option for local development. The .test TLD is
now reserved for development use. You can also use .localhost or
.example. You can even make up your own as long as it’s not a real TLD
in use.
I've always been using xampp for localhost but recently I had problems with the ports and tried to run the localhost with Wamp Server. Everything looked fine but when I typed localhost/bluedrive/drive/public the browser showed The requested URL /bluedrive/drive/public/auth/login was not found on this server. I forgot to mention that i'm using Laravel 5. When I used XAMPP I didn't have such problems. Why there is one with WAMP SERVER?
enable mod_rewrite in WAMP server.
The mod_rewrite module uses a rule-based rewriting engine, based on a PCRE regular-expression parser, to rewrite requested URLs on the fly.
so basically it sends the request to Laravel instead of finding folders with those names.
I've tried downloading apache for my development on Mac OS X (Leopard) from this site:
http://www.techiecorner.com/174/how-to-install-apache-php-mysql-with-macport-in-mac-os-x/
I haven't downloaded php, so I skipped the php checks and right after it finished downloading, and starting the server, I've opended 'localhost' in my browser, and it loaded a page says 'It Works!', so I guess I'm on the right way to using an apache web server.
Now, my questions are:
1. How do I know where is this 'localhost' folder, so I can put there html files and so on?
2. Is it already set that other user can reach my website (once I'll have one under the localhost folder), or do I need to do extra stuff in order to make it so? If this is the matter, what do I need to do more?
Thanks.
from your mentioned site i see that you installed via macports and apache then goes into /opt/local/apache2/.
i think there is an etc directory there, where the configuration is found, in a filed called httpd.conf, there you can find the documentroot directive, which is your 'localhost'folder.
1) it should be /opt/local/apache2/htdocs
2) i guess the default settings of the apache in macports have it listen to incoming requests on all interfaces of your mac, so yes, other users should be able to your website.
ps:
if you're looking for a quick-and-easy method to have a local webserver with php and mysql, i would recommend you take a look at xampp.
So I'm trying to install a local server to experiment on... Tried Wamp which gave this problem in the title (or so I thought).
Instead, I then tried installing Apache, and Xampp. Everything seems fine again. But when I type http://localhost into my browser (firefox, but for what it's worth the same thing happens with IE) it just redirects me to http://anonym.to/.
Anyone know why?
That's some kind of anonymizer site that acts as a proxy server to browse anonymously. You should probably check your /etc/hosts file to see if there is a redirect going on there for localhost or 127.0.0.1.
Either you have an entry in your Windows Hosts file %SystemRoot%\system32\drivers\etc\hosts (entry which you can delete by editing this file) or your browser has proxy settings set (which you can unset).