If you have defined Virtual Hosts, and thats a very good idea, then you need to define the vhosts name in the HOSTS file.
For example, the hosts file:
127.0.0.1 localhost ::1 localhost 127.0.0.1 vhost1.dev ::1 vhost1.dev 127.0.0.1 vhost2.dev ::1 vhost2.dev
Otherwise windows has no way of knowing where to look for them.
Another possibility for localhost not working is a corrupted HOSTS file. Try deleting it and recreating it with an editor that is not notepad.
Also when you change the HOSTS file you need to restart the dmscache service ‘DNS Client’ by either rebooting or better still run a command window using “Run as Administrator” and do this
net stop dnscache net start dnscache
that activates the new entries in your hosts file.
Related Posts:
- 404 Not Found The requested URL was not found on this server
- XAMPP, Apache – Error: Apache shutdown unexpectedly
- XAMPP installation on Win 8.1 with UAC Warning
- WAMP won’t turn green. And the VCRUNTIME140.dll error
- WordPress Subdomain MultiSite on localhost XAMPP on :8080 with IIS taking port 80
- how to config the home page locally
- How can I view my site directly from WordPress dashboard?
- Localhost WordPress Uploading of Images Issue
- Issues when moving from server to MAMP
- What is the difference between XAMPP or WAMP Server & IIS?
- How do I use MySQL through XAMPP?
- .htaccess redirect http to https
- Getting an error when I visit http://localhost
- What is the difference between Local Server and a Web Server?
- How to run php files on my computer
- Whats the point of running Laravel with the command ‘php artisan serve’?
- Cannot access to localhost/xampp/index.php
- localhost/xampp/ or http://localhost/index.php can’t be accessed
- PHP $_SERVER[‘HTTP_HOST’] vs. $_SERVER[‘SERVER_NAME’], am I understanding the man pages correctly?
- How do I run a file on localhost?
- #1045 – Access denied for user ‘root’@’localhost’ (using password: YES)
- client denied by server configuration
- What is HTTPD exactly?
- XAMPP: Connecting to localhost fix? [Persistent]
- Request exceeded the limit of 10 internal redirects due to probable configuration error
- How do you redirect HTTPS to HTTP?
- a2enmod command not found in apache server using cpanel in linux vps
- How do I disable directory browsing?
- Apache is downloading php files instead of displaying them
- lbmethod_heartbeat:notice – No slotmem from mod_heartmonitor –error after installing apache2.4.2 [closed]
- Difference between Systemctl and service command
- org.apache.jasper.JasperException
- Site does not exist error for a2ensite
- .htaccess: Invalid command ‘RewriteEngine’, perhaps misspelled or defined by a module not included in the server configuration
- PHP code is not being executed, but the code shows in the browser source code
- WordPress localhost not working
- Relative or dynamic site url possible?
- How do I get the right permissions for WordPress running Apache on Debian
- How can I improve site/page performance of WordPress websites?
- Connect to remote database using Localhost install
- Best practices for making a WordPress site “movable”?
- How to configure self hosted wordpress so that everything can be upgraded/installed from dashboard
- Installing WordPress in a Sub-Folder (not in root) on Localhost
- Connect to live db whilst working locally
- WordPress multisite causing Error 101 (net::ERR_CONNECTION_RESET): Unknown error [duplicate]
- What’s the proper way to setup WP-CLI on Ubuntu so that I don’t have to use the flag –allow-root?
- Which Apache-modules must I enable?
- How can I find the cause of theme crashing Apache in Xampplite?
- Why isn’t my imported database showing up? install.php pops up and adds new tables to the database
- WordPress redirecting to 127.0.0.1 when accessing the site from a remote device
- WAMP to XAMPP WordPress transfer
- After finishing building a site on localhost, how do I transfer everything to a client’s server?
- Is XAMPP faster than running LAMP in WSL on Windows 10? [closed]
- Why is the domain name missing from the logout redirect?
- Point root folder to blog.domain.com and subdirectory to domain.com possible?
- Unable to log in to localhost wp-admin page on XAMPP server
- Can only access homepage and admin panel
- Issues copying site into local machine
- Setting up a local copy from a production site
- Localhost WordPress not recognizing my online WordPress account
- can’t see aditional themes in control panel
- Show wordpress locally in xammp and in iPhone via ip
- Locally restoring a ManageWP full site backup
- Serving WordPress in it’s own directory on localhost on WAMP
- Why don’t WP themes download completely on my localhost (XAMMP)?
- Absolute Hyperlinks in WordPress Website Will Not Work In the Local Server
- Caching plugins + mod_pagespeed = overkill?
- Virtual HostX and MAMP not working with WordPress
- Plugin not working locally, but works on server
- I Made WordPress Multisite. And Now Everything Doesn’t Display Properly
- How to enable %postname% permalinks on Mac?
- WordPress: redirecting to my old public ip
- New wordpress keep redirecting to localhost/wp-admin/install.php
- Transfer XAMPP local WordPress website from one PC to another
- How to point domain to wordpress page
- Is a local multisite installation equivalent to multiple VirtualHosts?
- How to rename a wordpress site from http://myserver.example.com/blog to http://myserver.example.com/somethingelse or just http://myserver.example.com
- Multisite Dashboard Always Redirects to Main Dashboard
- WordPress in AWS Lightsail – restrict public IP
- XAMPP internal server error
- How do I move my site from localhost to my domain?
- Move site root directory on debian
- Search and Replace in Windows XAMPP site
- Testing localhost WordPress site over LAN with iPad, iPhone
- Timthumb isn’t displaying any images. “A TimThumb error has occured
- Why is local wordpress install calling live site executions?
- I got ERR_TOO_MANY_REDIRECTS on subdomain
- SVG files and wordpress
- Force relative path in media library for LAN deployment
- Error 500 ONLY in dashboard main page. How to fix it?
- Apache and Networks
- WordPress MAMP Installation Issue
- Transferring WordPress Instances
- All scripts and style links return 404 on a local virtualhost
- Configure VirtualHost for a perfect WordPress Environment
- I’m think I’ve found a bug with JetPack 1.7 [closed]
- CHMOD 0777, but WordPress still not able to write files/folders [closed]
- oEmbed work on localhost but not on distant server
- WordPress migration from live server to localhost having 404 error? [closed]
- Failed to upload image on localhost