My review: Alba MP31GD11BLK 1Gb MP3 player with SD card slot ►
◄ My review: Alba MP3256D10 MP3 player with SD card slot
EasyPHP is a straightforward way to get yourself a local server with PHP and MySQL. However, by default you browse this local server using http://localhost/, and putting each site into a different directory within this can cause a few headaches.
It's often more convenient to reference files relative to root — /directory/file.ext — than work out where they are relative to the current page — ../../directory/file.ext or similar — especially when using PHP include statements to do your on-every-page navigation stuff. This doesn't mesh particularly well with a single offline instance of Apache (such as that supplied with easyPHP) that contains directories for multiple sites, because root is /localhost/ rather than /localhost/examplesite.com/ or whatever.
Fortunately this can be solved, though since the search terms are rather generic finding the information can be tricky. In fact, you only need to edit a couple of files (then restart your offline server for the changes to take effect.)
in httpd.conf, add:
NameVirtualHost 127.0.0.1 <VirtualHost 127.0.0.1> DocumentRoot "D:\www\examplesite1.com" ServerName examplesite1 </VirtualHost> <VirtualHost 127.0.0.1> DocumentRoot "D:\www\examplesite2.com" ServerName examplesite2 </VirtualHost> <VirtualHost 127.0.0.1> DocumentRoot "D:\www" ServerName localhost </VirtualHost>
in your hosts file (probably C:\windows\system32\drivers\etc\hosts or similar):
127.0.0.1 localhost 127.0.0.1 examplesite1 127.0.0.1 examplesite2
They're then available in your browser as http://examplesite1/ etc.
💬 Comments are off, but you can use the mail form to contact or see the about page for social media links.