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

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

Related

apache not serving index.html unless specified

Im new to setting up apache - the site works fine on localhost but when I access it from the LAN it does now display the index.html file - instead the browser says:
This site can’t be reached
localhost refused to connect.
Ive tried editing the apache2.conf file but nothing seems to work
I think you made another mistake. When you are on a different Computer on you network, the Apache server is not available on http://localhost/ but on the domain name or IP of the Apache Server.
The browser tries to open a connection to your client computer. But its not on localhost.

Virtual host blocked on Chrome with Privacy Error

I'm using my localhost xampp with Apache, ports 80, 443. I've configured virtual host for my local application through some domain name, Recently chrome got updated to Version 63.0.3239.84 and while fetching the application it is throwing Privacy Error:
And while fetching the directly from the local host url, like localhost/phpmyadmin it opens the page:
I followed localhost blocked on Chrome with "Privacy Error" and tried configuring as suggested which was already enabled
Help me out with this.
I had the same problem. I fixed by changing my vhost from *.dev to *.local.
See Virtual host being redirected to https://adminboard.app in google chrome

Error 404 - Not Found

Good Afternoon,
I'm elaborating a project and I've instaled php,mysql, apache2 in a virtualbox with ubuntu16.04.
I'm working locally and I've instaled laravel 5.3, I have an API running and created a new virtual host and placed the DocumentRoot my_folder and ServerName name_virtual_host. Then I went to my host files and placed a new line: 127.0.0.1 name_virtual_host. When I place on my browser http://name_virtual_host, the laravel page appears like it is supposed, but when I type in http://name_virtual_host/api, it gives back:
Not Found
The requested URL /api was not found on this server.
Apache/2.4.18 (Ubuntu) Server at name_virtual_host Port 80
it used to appear JSON.
How can I solve this?
Thanks.

WAMP localhost redirects to my IP

I had to recently wipe my PC and I'm setting up my development environment again using WAMP.
After installing WAMP, if I visit http://localhost instead of seeing the WAMP homepage I get redirected to http://x.x.x.x, where x.x.x.x is my IP.
I had this issue on another PC and after setting the inbound rules for Apache HTTP Server in my Windows Firewall settings to allow all domains it fixed the issue. I applied this to my PC, and the issue does not seem to be present for Internet Explorer, whereas for Chrome and Firefox the localhost to my IP redirect issue persists even after clearing the cache for each browser.
My C:\Windows\System32\drivers\etc\hosts file looks like this:
127.0.0.1 localhost
::1 localhost
and my firewall rules look like this:
I am not currently using vhosts and I'm on a network at my workplace (if that has any implications?)
I also encountered the same issue when using Laragon which uses vhosts and whenever I visited a virtual host, e.g. mysite.dev it didn't work properly either.
My question on the Laragon forum: https://forum.laragon.org/topic/126/accessing-mysite-dev-redirects-to-url-which-shows-index-php-at-root-folder/3
The Problem
I'm behind a proxy which is used for browsing the web at my workplace. The proxy seemed to be messing up the dns resolution whenever I made a call to localhost (when using wamp) or one of my vhosts (when using Laragon).
This was clear as when I ran the following from the command line: ping site.dev I was getting the expected response from 127.0.0.1. However, when going to site.dev in my browser I was getting redirected to my IP, so essentially my etc/hosts file was being ignored for dns resolution.
The difference between the two being that the browser is using the proxy whereas the command line isn't!
The Solution
After trying many different solutions which seemed to work for localhost (on wamp) only, but not vhosts (on Laragon) I finally got to the solution which was actually so simple!
So, for chrome I simply went to chrome://settings/ > Network - Change proxy settings > LAN Settings > Proxy Server - Advanced
Then in the Exceptions text box I added the following:
*.dev;localhost;127.0.0.1
Here's a screenshot of my settings from Chrome/Internet Options
And that did the trick! Hope this can help someone else.

Access virtual host on apache without host redirection?

I have apache 2.4 installed on Ubuntu server 14.04 and have setup different virtual host like domain1.com,domain2.com,domain3.com. The web server is meant to be accessed only from local network. So I tried to edit /windows/syste32/drivers/hosts and added line like this
192.168.1.90 domain1.com
and can now access the domain1 from that machine by simply putting domain1.com in browser. However I wonder if I can access specific virtual host on apache without editing the hosts file, I mean entering something like this in browser
192.168.1.90/domain1.com
, but this doesn't work since apache tries to retrieve content from the default host. In other words: If I know the apache server ip and virtual host domain, can I access it via browser directly?