Localhost not working Mac OS X Yosemite 10.10.5 - apache

I'm setting up localhost and "localhost" by itself does print
It works!
But when trying to access "http://localhost/Users/Marcel/Sites/hello.html" it outputs the 404 not found error. I followed this https://discussions.apple.com/docs/DOC-3083.

First you must install a Web Server like MAMP, and follow this easy procedure:
Put your files in the directory Applications/MAMP/htdocs
Open MAMP
Configure a port to listen HTTP (like 8080)
Start MAMP
Open browser and go to http://localhost:YOUR_PORT/FileName.extension

Related

Disable SSL on localhost using MAMP

Month ago I've installed MAMP (not PRO) and I set SSL for localhost following this tutorial. It works perfectly by the way:
https://torbjornzetterlund.com/how-to-get-ssl-working-on-mamp-for-os-x/
Today I removed MAMP and install it again, but I can't access localhost with http://localhost, it redirects to https:// and connection is not allowed.
The apache config is the default config.
How can I remove/disable the openSSL I set?
I tried solutions mentioned here without success
Wordpress always redirects to https after copying to localhost
But the only thing that worked was to change default MAMP ports under MAMP > Preferences
I ran into a similar issue. I set up a local host SSL environment for the one site as required to develop with the Facebook Api and instagram api.
When I went to update the site to a fresh directory with the newest version in production, it would fail because the SSL is not setup for the new directory yet. Redirecting me to https://www.localhost.
My solution was to backtrack using documentation on how to enable SSL on the site. What I found is this:
This is tested on MAMP Free version, possibly works on PRO but untested.
The instructions state:
Open /Applications/MAMP/conf/apache/httpd.conf and uncomment Include /Applications/MAMP/conf/apache/extra/httpd-ssl.conf.
So I navigated to that directory, opened the httpd-ssl.conf file in my text editor and located the uncommented line, commented this line using "#" and save. Doing this resulted in disabling the ssl behavior and retains all my previous configuration.
When your ready to go back to SSL, uncomment that line and make sure you have reconfigured your ssl to the new directory(Github below explains how to configure for ssl). Here is the github I reference for the work. Good luck!
https://gist.github.com/jfloff/5138826
Line #3
I am using MAMP Free version and accidentally launched the PRO version.
It changed ports for the Free version too... So suddenly localhost and other virtual hosts changed to SSL.
Reseting ports in the Free Version with the button "Set Web & MySQL ports to 80 & 3306" worked for me.

Unable to access Apache Vhost

I'm running apache through a clean Ubuntu server VM on Parallels for Mac. I have it set up following this tutorial
But when I try to access it from my mac, I get no response. Ping returns a response, but not viewing the page in chrome.
Here is my vhost file ccminecraft.com.conf
I also tried putting in
192.168.1.108 ccminecraft.com
192.168.1.108 www.ccminecraft.com
into my hosts file on my mac, but that didn't work. nslookup returns that it's searching on google's DNS, which both my mac and router are configured to use. But shouldn't it be going to 192.168.1.108 instead of doing a DNS lookup?
Try telneting the port 80 on your ip#
telnet 192.168.1.108 80 if it doesn't respond you need to reconfigure your firewall or disable it.
service iptables stop
systemd --> systemctl stop firewall
Before usig DNS try with ip# so in :
ServerName put yout_ip# if it works you need to disble the adapter that link you to the internet and just let VM adapter enabled

Apache running on XAMPP, but localhost is not reachable

I installed XAMPP and started the Apache Server and MySQL. However, if I try to access https://localhost/, it just shows a blank page in Firefox. I am on a Windows 10 machine. I already tried to change the localhost port from 80 to 8080, but it says that it cannot open the page this way.
Any ideas what the reason could be?

Wamp and laravel installation, virtual host works but localhost not(Not Found The requested URL / was not found on this server.)

I've been installing WAMP on a windows machine, then I install laravel framework, make the virtual host configurations and now i work correctly with that virtual host. When i type on the browser http://laravel.dev/ the applications works correctly but when i try to work with other projects on localhost the browser show me the next message:
Not Found
The requested URL / was not found on this server.
Apache/2.4.9 (Win64) PHP/5.5.12 Server at localhost Port 80
FYI when i type this
localhost/phpmyadmin/
Works fine.
Any suggestions?
I had the same issue. I just went to the httpd.conf file and checked if the following was correct:
# Virtual hosts
# Include conf/extra/httpd-vhosts.conf

Cannot Connect to Localhost in Windows

How can I access my local phpmyadmin with my web browser? I tried it on both Firefox and Chrome and both cannot load. I have XAMPP and I am working on Vista.
Is your XAMPP working?
Try: http://localhost/
You should see the XAMPP console and from there you can go to phpmyadmin.
If you don't see the console is because XAMPP is not running.
Try to check the port that you using :
Open the file [XAMPP Installation Folder]/apache/conf/httpd.conf.
Then search for the string “ServerName”
For example in my httpd.conf the result is : ServerName localhost:8081
Then I use http://localhost:8081/phpmyadmin